diff options
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 2c83fb2df6..8c348731d6 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -219,6 +219,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = exceptions.insert("DefaultProjectIcon"); exceptions.insert("GuiChecked"); exceptions.insert("GuiRadioChecked"); + exceptions.insert("GuiIndeterminate"); exceptions.insert("GuiCloseCustomizable"); exceptions.insert("GuiGraphNodePort"); exceptions.insert("GuiResizer"); @@ -595,6 +596,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("panel", "PanelContainer", style_menu); theme->set_stylebox("MenuPanel", "EditorStyles", style_menu); + // CanvasItem Editor + Ref<StyleBoxFlat> style_canvas_editor_info = make_flat_stylebox(Color(0.0, 0.0, 0.0, 0.2)); + style_canvas_editor_info->set_expand_margin_size_all(4 * EDSCALE); + theme->set_stylebox("CanvasItemInfoOverlay", "EditorStyles", style_canvas_editor_info); + // Script Editor theme->set_stylebox("ScriptEditorPanel", "EditorStyles", make_empty_stylebox(default_margin_size, 0, default_margin_size, default_margin_size)); theme->set_stylebox("ScriptEditor", "EditorStyles", make_empty_stylebox(0, 0, 0, 0)); @@ -812,6 +818,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // Tree theme->set_icon("checked", "Tree", theme->get_icon("GuiChecked", "EditorIcons")); + theme->set_icon("indeterminate", "Tree", theme->get_icon("GuiIndeterminate", "EditorIcons")); theme->set_icon("unchecked", "Tree", theme->get_icon("GuiUnchecked", "EditorIcons")); theme->set_icon("arrow", "Tree", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); theme->set_icon("arrow_collapsed", "Tree", theme->get_icon("GuiTreeArrowRight", "EditorIcons")); @@ -1354,7 +1361,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("label_width", "ColorPicker", 10 * EDSCALE); theme->set_icon("screen_picker", "ColorPicker", theme->get_icon("ColorPick", "EditorIcons")); theme->set_icon("add_preset", "ColorPicker", theme->get_icon("Add", "EditorIcons")); - theme->set_icon("preset_bg", "ColorPicker", theme->get_icon("GuiMiniCheckerboard", "EditorIcons")); + theme->set_icon("sample_bg", "ColorPicker", theme->get_icon("GuiMiniCheckerboard", "EditorIcons")); theme->set_icon("overbright_indicator", "ColorPicker", theme->get_icon("OverbrightIndicator", "EditorIcons")); theme->set_icon("bar_arrow", "ColorPicker", theme->get_icon("ColorPickerBarArrow", "EditorIcons")); theme->set_icon("picker_cursor", "ColorPicker", theme->get_icon("PickerCursor", "EditorIcons")); @@ -1362,6 +1369,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // ColorPickerButton theme->set_icon("bg", "ColorPickerButton", theme->get_icon("GuiMiniCheckerboard", "EditorIcons")); + // ColorPresetButton + Ref<StyleBoxFlat> preset_sb = make_flat_stylebox(Color(1, 1, 1), 2, 2, 2, 2, 2); + preset_sb->set_anti_aliased(false); + theme->set_stylebox("preset_fg", "ColorPresetButton", preset_sb); + theme->set_icon("preset_bg", "ColorPresetButton", theme->get_icon("GuiMiniCheckerboard", "EditorIcons")); + theme->set_icon("overbright_indicator", "ColorPresetButton", theme->get_icon("OverbrightIndicator", "EditorIcons")); + // Information on 3D viewport Ref<StyleBoxFlat> style_info_3d_viewport = style_default->duplicate(); style_info_3d_viewport->set_bg_color(style_info_3d_viewport->get_bg_color() * Color(1, 1, 1, 0.5)); @@ -1499,15 +1513,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { } Ref<Theme> create_custom_theme(const Ref<Theme> p_theme) { - Ref<Theme> theme; + Ref<Theme> theme = create_editor_theme(p_theme); - const String custom_theme = EditorSettings::get_singleton()->get("interface/theme/custom_theme"); - if (custom_theme != "") { - theme = ResourceLoader::load(custom_theme); - } - - if (!theme.is_valid()) { - theme = create_editor_theme(p_theme); + const String custom_theme_path = EditorSettings::get_singleton()->get("interface/theme/custom_theme"); + if (custom_theme_path != "") { + Ref<Theme> custom_theme = ResourceLoader::load(custom_theme_path); + if (custom_theme.is_valid()) { + theme->merge_with(custom_theme); + } } return theme; |