diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-02-13 02:36:25 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-02-15 20:23:12 +0100 |
commit | 8c063187228875c379288bd712ee47c0cbcea47c (patch) | |
tree | eead7ea422b480ca7653fd34bf524b35740361e4 /editor/project_manager.cpp | |
parent | 26b21dc0cb517f9baacdaceafe09285952540d6a (diff) | |
download | redot-engine-8c063187228875c379288bd712ee47c0cbcea47c.tar.gz |
Tweak the default project icon
This only affects newly created projects.
- Use a 128×128 resolution to make the icon look crisp on hiDPI displays.
- Darken the icon's outside area and remove the border, as the
contrast rate between the icon and its background is now sufficient.
This different design also allows distinguishing projects that
were made with Godot 3.x from projects made with Godot 4.0.
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r-- | editor/project_manager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 3ca25bb4e3..98912b7ca2 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1178,6 +1178,12 @@ void ProjectList::load_project_icon(int p_index) { icon = default_icon; } + // The default project icon is 128×128 to look crisp on hiDPI displays, + // but we want the actual displayed size to be 64×64 on loDPI displays. + item.control->icon->set_ignore_texture_size(true); + item.control->icon->set_custom_minimum_size(Size2(64, 64) * EDSCALE); + item.control->icon->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED); + item.control->icon->set_texture(icon); item.control->icon_needs_reload = false; } |