diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-09-22 15:52:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 15:52:12 +0200 |
commit | 5824766a3cea92040dea6cc0cf59ee95ed86a68e (patch) | |
tree | fb54cf7cc2c2e8a94a7f827e3d84bb83f577c3ec | |
parent | 071d359f429b179b01688fb7332b18c7b16af81d (diff) | |
parent | 740100d671f37db47dd15a3b6109225c17a0c4c6 (diff) |
Merge pull request #41430 from Lunatoid/no-icon-resize
Fixes DefaultProjectIcon scaling with editor scale
-rw-r--r-- | editor/editor_themes.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 11b0228fd5..79525ced51 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -218,8 +218,15 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = // Generate icons. if (!p_only_thumbs) { for (int i = 0; i < editor_icons_count; i++) { + float icon_scale = EDSCALE; + + // Always keep the DefaultProjectIcon at the default size + if (strcmp(editor_icons_names[i], "DefaultProjectIcon") == 0) { + icon_scale = 1.0f; + } + const int is_exception = exceptions.has(editor_icons_names[i]); - const Ref<ImageTexture> icon = editor_generate_icon(i, !is_exception); + const Ref<ImageTexture> icon = editor_generate_icon(i, !is_exception, icon_scale); p_theme->set_icon(editor_icons_names[i], "EditorIcons", icon); } |