Browse Source

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

Tweak the default project icon
Yuri Sizov 3 years ago
parent
commit
d6090174b3
2 changed files with 6 additions and 0 deletions
  1. 0 0
      editor/icons/DefaultProjectIcon.svg
  2. 6 0
      editor/project_manager.cpp

File diff suppressed because it is too large
+ 0 - 0
editor/icons/DefaultProjectIcon.svg


+ 6 - 0
editor/project_manager.cpp

@@ -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;
 }

Some files were not shown because too many files changed in this diff