diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-09 16:52:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 16:52:32 +0200 |
commit | 24ce46e2a17558cfdfbfab8c8109b6630a19287f (patch) | |
tree | 17b36ea833b7f88f46c75fe44fa875e9b0ac1ed2 /editor/editor_themes.cpp | |
parent | 82031fa231506ef036ccd06e740a7ca2ceca20d0 (diff) | |
parent | 817d4db21f183d4e1bdb5c1101f221aa3ed10da0 (diff) |
Merge pull request #64938 from YuriSizov/editor-scaled-icons
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 9e983839f9..64ddecc588 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -447,6 +447,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // Colors bool dark_theme = EditorSettings::get_singleton()->is_dark_theme(); +#ifdef MODULE_SVG_ENABLED + if (dark_theme) { + ImageLoaderSVG::set_forced_color_map(HashMap<Color, Color>()); + } else { + ImageLoaderSVG::set_forced_color_map(EditorColorMap::get()); + } +#endif + // Ensure base colors are in the 0..1 luminance range to avoid 8-bit integer overflow or text rendering issues. // Some places in the editor use 8-bit integer colors. const Color dark_color_1 = base_color.lerp(Color(0, 0, 0, 1), contrast).clamp(); |