Skip to content

Commit

Permalink
Merge pull request #58059 from Calinou/tweak-default-project-icon-2
Browse files Browse the repository at this point in the history
Tweak the default project icon
  • Loading branch information
YuriSizov authored Aug 18, 2022
2 parents 9bb6cc5 + 8c06318 commit d609017
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion editor/icons/DefaultProjectIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions editor/project_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d609017

Please sign in to comment.