summaryrefslogtreecommitdiff
path: root/editor/editor_themes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r--editor/editor_themes.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 0c908be441..f0cc1530ab 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -380,6 +380,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color font_color = mono_color.lerp(base_color, 0.25);
const Color font_hover_color = mono_color.lerp(base_color, 0.125);
const Color font_disabled_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.3);
+ const Color font_readonly_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.65);
const Color selection_color = accent_color * Color(1, 1, 1, 0.4);
const Color disabled_color = mono_color.inverted().lerp(base_color, 0.7);
const Color disabled_bg_color = mono_color.inverted().lerp(base_color, 0.9);
@@ -582,6 +583,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Focus
theme->set_stylebox("Focus", "EditorStyles", style_widget_focus);
+ // Use a less opaque color to be less distracting for the 2D and 3D editor viewports.
+ Ref<StyleBoxFlat> style_widget_focus_viewport = style_widget_focus->duplicate();
+ style_widget_focus_viewport->set_border_color(accent_color * Color(1, 1, 1, 0.5));
+ theme->set_stylebox("FocusViewport", "EditorStyles", style_widget_focus_viewport);
// Menu
Ref<StyleBoxFlat> style_menu = style_widget->duplicate();
@@ -1024,9 +1029,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("read_only", "LineEdit", style_line_edit_disabled);
theme->set_icon("clear", "LineEdit", theme->get_icon("GuiClose", "EditorIcons"));
theme->set_color("read_only", "LineEdit", font_disabled_color);
- theme->set_color("font_uneditable_color", "LineEdit", font_disabled_color);
theme->set_color("font_color", "LineEdit", font_color);
theme->set_color("font_selected_color", "LineEdit", mono_color);
+ theme->set_color("font_uneditable_color", "LineEdit", font_readonly_color);
theme->set_color("caret_color", "LineEdit", font_color);
theme->set_color("selection_color", "LineEdit", selection_color);
theme->set_color("clear_button_color", "LineEdit", font_color);
@@ -1086,17 +1091,16 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_window_title->set_corner_radius(CORNER_TOP_RIGHT, 0);
// Prevent visible line between window title and body.
style_window_title->set_expand_margin_size(SIDE_BOTTOM, 2 * EDSCALE);
- theme->set_stylebox("panel", "Window", style_window_title);
Ref<StyleBoxFlat> style_window = style_popup->duplicate();
style_window->set_border_color(base_color);
style_window->set_border_width(SIDE_TOP, 24 * EDSCALE);
style_window->set_expand_margin_size(SIDE_TOP, 24 * EDSCALE);
- theme->set_stylebox("panel_window", "Window", style_window);
+ theme->set_stylebox("embedded_border", "Window", style_window);
theme->set_color("title_color", "Window", font_color);
theme->set_icon("close", "Window", theme->get_icon("GuiClose", "EditorIcons"));
- theme->set_icon("close_highlight", "Window", theme->get_icon("GuiClose", "EditorIcons"));
+ theme->set_icon("close_pressed", "Window", theme->get_icon("GuiClose", "EditorIcons"));
theme->set_constant("close_h_ofs", "Window", 22 * EDSCALE);
theme->set_constant("close_v_ofs", "Window", 20 * EDSCALE);
theme->set_constant("title_height", "Window", 24 * EDSCALE);
@@ -1112,6 +1116,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("panel", "ProjectSettingsEditor", style_complex_window);
theme->set_stylebox("panel", "EditorAbout", style_complex_window);
+ // AcceptDialog
+ theme->set_stylebox("panel", "AcceptDialog", style_window_title);
+
// HScrollBar
Ref<Texture2D> empty_icon = memnew(ImageTexture);
@@ -1190,7 +1197,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_tooltip->set_default_margin(SIDE_TOP, default_margin_size * EDSCALE * 0.5);
style_tooltip->set_default_margin(SIDE_RIGHT, default_margin_size * EDSCALE);
style_tooltip->set_default_margin(SIDE_BOTTOM, default_margin_size * EDSCALE * 0.5);
- style_tooltip->set_bg_color(mono_color.inverted());
+ style_tooltip->set_bg_color(mono_color.inverted() * Color(1, 1, 1, 0.9));
style_tooltip->set_border_width_all(0);
theme->set_color("font_color", "TooltipLabel", font_hover_color);
theme->set_color("font_color_shadow", "TooltipLabel", Color(0, 0, 0, 0));