Merge pull request #58059 from Calinou/tweak-default-project-icon-2

Tweak the default project icon
This commit is contained in:
Yuri Sizov 2022-08-18 22:31:39 +03:00 committed by GitHub
commit d6090174b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -1164,6 +1164,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;
}