diff options
author | Yuri Sizov <yuris@humnom.net> | 2024-01-30 17:35:46 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2024-01-30 17:52:25 +0100 |
commit | 28e8a4c0ee782fc54b822401885b38172b9b0e41 (patch) | |
tree | 961aae399a97158bf2f8bd107bd2452f898f73ba /editor/themes | |
parent | 068c0d2699066f833694cf912d299acbf6b8755a (diff) | |
download | redot-engine-28e8a4c0ee782fc54b822401885b38172b9b0e41.tar.gz |
Replace empty list dialog with an integrated panel
Diffstat (limited to 'editor/themes')
-rw-r--r-- | editor/themes/editor_fonts.cpp | 3 | ||||
-rw-r--r-- | editor/themes/editor_theme_manager.cpp | 24 |
2 files changed, 26 insertions, 1 deletions
diff --git a/editor/themes/editor_fonts.cpp b/editor/themes/editor_fonts.cpp index 3479c67b46..c13ee6e6b0 100644 --- a/editor/themes/editor_fonts.cpp +++ b/editor/themes/editor_fonts.cpp @@ -388,6 +388,9 @@ void editor_register_fonts(const Ref<Theme> &p_theme) { p_theme->set_font("main_bold_msdf", EditorStringName(EditorFonts), bold_fc_msdf); p_theme->set_font_size("bold_size", EditorStringName(EditorFonts), default_font_size); + p_theme->set_font("italic", EditorStringName(EditorFonts), italic_fc); + p_theme->set_font_size("italic_size", EditorStringName(EditorFonts), default_font_size); + // Title font. p_theme->set_font("title", EditorStringName(EditorFonts), bold_fc); diff --git a/editor/themes/editor_theme_manager.cpp b/editor/themes/editor_theme_manager.cpp index bccfe6d786..d89bbb7223 100644 --- a/editor/themes/editor_theme_manager.cpp +++ b/editor/themes/editor_theme_manager.cpp @@ -1590,7 +1590,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme, ThemeConfiguration &p_config) { // Project manager. { - p_theme->set_stylebox("search_panel", "ProjectManager", p_config.tree_panel_style); + p_theme->set_stylebox("project_list", "ProjectManager", p_config.tree_panel_style); p_theme->set_constant("sidebar_button_icon_separation", "ProjectManager", int(6 * EDSCALE)); // ProjectTag. @@ -1769,6 +1769,28 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme p_theme->set_stylebox("pressed", "EditorLogFilterButton", editor_log_button_pressed); } + // Buttons styles that stand out against the panel background (e.g. AssetLib). + { + p_theme->set_type_variation("PanelBackgroundButton", "Button"); + + Ref<StyleBoxFlat> panel_button_style = p_config.button_style->duplicate(); + panel_button_style->set_bg_color(p_config.base_color.lerp(p_config.mono_color, 0.08)); + + Ref<StyleBoxFlat> panel_button_style_hover = p_config.button_style_hover->duplicate(); + panel_button_style_hover->set_bg_color(p_config.base_color.lerp(p_config.mono_color, 0.16)); + + Ref<StyleBoxFlat> panel_button_style_pressed = p_config.button_style_pressed->duplicate(); + panel_button_style_pressed->set_bg_color(p_config.base_color.lerp(p_config.mono_color, 0.20)); + + Ref<StyleBoxFlat> panel_button_style_disabled = p_config.button_style_disabled->duplicate(); + panel_button_style_disabled->set_bg_color(p_config.disabled_bg_color); + + p_theme->set_stylebox("normal", "PanelBackgroundButton", panel_button_style); + p_theme->set_stylebox("hover", "PanelBackgroundButton", panel_button_style_hover); + p_theme->set_stylebox("pressed", "PanelBackgroundButton", panel_button_style_pressed); + p_theme->set_stylebox("disabled", "PanelBackgroundButton", panel_button_style_disabled); + } + // Top bar selectors. { p_theme->set_type_variation("TopBarOptionButton", "OptionButton"); |