Browse Source

Always size project icons to default icon size

I wasn't able to reproduce the issue, but this should fix #10620
Hein-Pieter van Braam 8 năm trước cách đây
mục cha
commit
a276320329
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      editor/project_manager.cpp

+ 2 - 1
editor/project_manager.cpp

@@ -805,7 +805,8 @@ void ProjectManager::_load_recent_projects() {
 				Error err = img->load(appicon.replace_first("res://", path + "/"));
 				if (err == OK) {
 
-					img->resize(64, 64);
+					Ref<Texture> default_icon = get_icon("DefaultProjectIcon", "EditorIcons");
+					img->resize(default_icon->get_width(), default_icon->get_height());
 					Ref<ImageTexture> it = memnew(ImageTexture);
 					it->create_from_image(img);
 					icon = it;