|
@@ -704,7 +704,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
{
|
|
|
// Button.
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "Button", p_config.button_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "Button", p_config.button_style);
|
|
|
p_theme->set_stylebox("hover", "Button", p_config.button_style_hover);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "Button", p_config.button_style_pressed);
|
|
|
p_theme->set_stylebox("focus", "Button", p_config.button_style_focus);
|
|
@@ -730,7 +730,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
|
|
|
// MenuButton.
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "MenuButton", p_config.panel_container_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "MenuButton", p_config.panel_container_style);
|
|
|
p_theme->set_stylebox("hover", "MenuButton", p_config.button_style_hover);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "MenuButton", p_config.panel_container_style);
|
|
|
p_theme->set_stylebox("focus", "MenuButton", p_config.panel_container_style);
|
|
@@ -746,7 +746,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
|
|
|
// MenuBar.
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "MenuBar", p_config.button_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "MenuBar", p_config.button_style);
|
|
|
p_theme->set_stylebox("hover", "MenuBar", p_config.button_style_hover);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "MenuBar", p_config.button_style_pressed);
|
|
|
p_theme->set_stylebox("disabled", "MenuBar", p_config.button_style_disabled);
|
|
@@ -783,7 +783,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
option_button_disabled_style->set_content_margin(SIDE_RIGHT, 4 * EDSCALE);
|
|
|
|
|
|
p_theme->set_stylebox("focus", "OptionButton", option_button_focus_style);
|
|
|
- p_theme->set_stylebox("normal", "OptionButton", p_config.button_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "OptionButton", p_config.button_style);
|
|
|
p_theme->set_stylebox("hover", "OptionButton", p_config.button_style_hover);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "OptionButton", p_config.button_style_pressed);
|
|
|
p_theme->set_stylebox("disabled", "OptionButton", p_config.button_style_disabled);
|
|
@@ -816,7 +816,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
|
|
|
// CheckButton.
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "CheckButton", p_config.panel_container_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "CheckButton", p_config.panel_container_style);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "CheckButton", p_config.panel_container_style);
|
|
|
p_theme->set_stylebox("disabled", "CheckButton", p_config.panel_container_style);
|
|
|
p_theme->set_stylebox("hover", "CheckButton", p_config.panel_container_style);
|
|
@@ -855,7 +855,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
Ref<StyleBoxFlat> checkbox_style = p_config.panel_container_style->duplicate();
|
|
|
checkbox_style->set_content_margin_all(p_config.base_margin * EDSCALE);
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "CheckBox", checkbox_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "CheckBox", checkbox_style);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "CheckBox", checkbox_style);
|
|
|
p_theme->set_stylebox("disabled", "CheckBox", checkbox_style);
|
|
|
p_theme->set_stylebox("hover", "CheckBox", checkbox_style);
|
|
@@ -1177,7 +1177,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
|
|
|
// LineEdit.
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "LineEdit", text_editor_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "LineEdit", text_editor_style);
|
|
|
p_theme->set_stylebox("focus", "LineEdit", p_config.button_style_focus);
|
|
|
p_theme->set_stylebox("read_only", "LineEdit", text_editor_disabled_style);
|
|
|
|
|
@@ -1199,7 +1199,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
|
|
|
// TextEdit.
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "TextEdit", text_editor_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "TextEdit", text_editor_style);
|
|
|
p_theme->set_stylebox("focus", "TextEdit", p_config.button_style_focus);
|
|
|
p_theme->set_stylebox("read_only", "TextEdit", text_editor_disabled_style);
|
|
|
|
|
@@ -1430,7 +1430,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
{
|
|
|
// RichTextLabel.
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "RichTextLabel", p_config.tree_panel_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "RichTextLabel", p_config.tree_panel_style);
|
|
|
p_theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox());
|
|
|
|
|
|
p_theme->set_color("default_color", "RichTextLabel", p_config.font_color);
|
|
@@ -1445,7 +1445,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
|
|
|
// Label.
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "Label", p_config.base_empty_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "Label", p_config.base_empty_style);
|
|
|
|
|
|
p_theme->set_color("font_color", "Label", p_config.font_color);
|
|
|
p_theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0));
|
|
@@ -1620,7 +1620,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
|
|
|
// GraphNode's title Label.
|
|
|
p_theme->set_type_variation("GraphNodeTitleLabel", "Label");
|
|
|
- p_theme->set_stylebox("normal", "GraphNodeTitleLabel", make_empty_stylebox(0, 0, 0, 0));
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "GraphNodeTitleLabel", make_empty_stylebox(0, 0, 0, 0));
|
|
|
p_theme->set_color("font_color", "GraphNodeTitleLabel", p_config.dark_theme ? p_config.font_color : Color(1, 1, 1)); // Also use a bright font color for light themes.
|
|
|
p_theme->set_color("font_shadow_color", "GraphNodeTitleLabel", Color(0, 0, 0, 0.35));
|
|
|
p_theme->set_constant("shadow_outline_size", "GraphNodeTitleLabel", 4);
|
|
@@ -1652,7 +1652,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|
|
|
|
|
// GraphFrame's title Label.
|
|
|
p_theme->set_type_variation("GraphFrameTitleLabel", "Label");
|
|
|
- p_theme->set_stylebox("normal", "GraphFrameTitleLabel", memnew(StyleBoxEmpty));
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "GraphFrameTitleLabel", memnew(StyleBoxEmpty));
|
|
|
p_theme->set_font_size("font_size", "GraphFrameTitleLabel", 22);
|
|
|
p_theme->set_color("font_color", "GraphFrameTitleLabel", Color(1, 1, 1));
|
|
|
p_theme->set_color("font_shadow_color", "GraphFrameTitleLabel", Color(0, 0, 0, 0));
|
|
@@ -1730,7 +1730,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
tag->set_corner_radius(CORNER_BOTTOM_LEFT, 0);
|
|
|
tag->set_corner_radius(CORNER_TOP_RIGHT, 4);
|
|
|
tag->set_corner_radius(CORNER_BOTTOM_RIGHT, 4);
|
|
|
- p_theme->set_stylebox("normal", "ProjectTag", tag);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "ProjectTag", tag);
|
|
|
|
|
|
tag = p_config.button_style_hover->duplicate();
|
|
|
tag->set_corner_radius(CORNER_TOP_LEFT, 0);
|
|
@@ -1809,13 +1809,13 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
menu_transparent_style->set_content_margin((Side)i, p_config.button_style->get_content_margin((Side)i));
|
|
|
main_screen_button_hover->set_content_margin((Side)i, p_config.button_style_hover->get_content_margin((Side)i));
|
|
|
}
|
|
|
- p_theme->set_stylebox("normal", "MainScreenButton", menu_transparent_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "MainScreenButton", menu_transparent_style);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "MainScreenButton", menu_transparent_style);
|
|
|
p_theme->set_stylebox("hover", "MainScreenButton", main_screen_button_hover);
|
|
|
p_theme->set_stylebox("hover_pressed", "MainScreenButton", main_screen_button_hover);
|
|
|
|
|
|
p_theme->set_type_variation("MainMenuBar", "FlatMenuButton");
|
|
|
- p_theme->set_stylebox("normal", "MainMenuBar", menu_transparent_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "MainMenuBar", menu_transparent_style);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "MainMenuBar", main_screen_button_hover);
|
|
|
p_theme->set_stylebox("hover", "MainMenuBar", main_screen_button_hover);
|
|
|
p_theme->set_stylebox("hover_pressed", "MainMenuBar", main_screen_button_hover);
|
|
@@ -1830,7 +1830,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
style_bottom_panel->set_corner_radius_all(p_config.corner_radius * EDSCALE);
|
|
|
p_theme->set_stylebox("BottomPanel", EditorStringName(EditorStyles), style_bottom_panel);
|
|
|
p_theme->set_type_variation("BottomPanelButton", "FlatMenuButton");
|
|
|
- p_theme->set_stylebox("normal", "BottomPanelButton", menu_transparent_style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "BottomPanelButton", menu_transparent_style);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "BottomPanelButton", menu_transparent_style);
|
|
|
p_theme->set_stylebox("hover_pressed", "BottomPanelButton", main_screen_button_hover);
|
|
|
p_theme->set_stylebox("hover", "BottomPanelButton", main_screen_button_hover);
|
|
@@ -1900,12 +1900,12 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
}
|
|
|
style_flat_button_pressed->set_bg_color(flat_pressed_color);
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "FlatButton", style_flat_button);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "FlatButton", style_flat_button);
|
|
|
p_theme->set_stylebox("hover", "FlatButton", style_flat_button_hover);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "FlatButton", style_flat_button_pressed);
|
|
|
p_theme->set_stylebox("disabled", "FlatButton", style_flat_button);
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "FlatMenuButton", style_flat_button);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "FlatMenuButton", style_flat_button);
|
|
|
p_theme->set_stylebox("hover", "FlatMenuButton", style_flat_button_hover);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "FlatMenuButton", style_flat_button_pressed);
|
|
|
p_theme->set_stylebox("disabled", "FlatMenuButton", style_flat_button);
|
|
@@ -1930,7 +1930,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
if (!p_config.dark_theme) {
|
|
|
editor_log_button_pressed->set_bg_color(flat_pressed_color.lightened(0.5));
|
|
|
}
|
|
|
- p_theme->set_stylebox("normal", "EditorLogFilterButton", style_flat_button);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "EditorLogFilterButton", style_flat_button);
|
|
|
p_theme->set_stylebox("hover", "EditorLogFilterButton", style_flat_button_hover);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "EditorLogFilterButton", editor_log_button_pressed);
|
|
|
}
|
|
@@ -1951,7 +1951,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
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(CoreStringName(normal), "PanelBackgroundButton", panel_button_style);
|
|
|
p_theme->set_stylebox("hover", "PanelBackgroundButton", panel_button_style_hover);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "PanelBackgroundButton", panel_button_style_pressed);
|
|
|
p_theme->set_stylebox("disabled", "PanelBackgroundButton", panel_button_style_disabled);
|
|
@@ -1986,7 +1986,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
Ref<StyleBoxFlat> style_inspector_action = p_config.button_style->duplicate();
|
|
|
style_inspector_action->set_bg_color(color_inspector_action);
|
|
|
style_inspector_action->set_content_margin(SIDE_RIGHT, action_extra_margin);
|
|
|
- p_theme->set_stylebox("normal", "InspectorActionButton", style_inspector_action);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "InspectorActionButton", style_inspector_action);
|
|
|
|
|
|
style_inspector_action = p_config.button_style_hover->duplicate();
|
|
|
style_inspector_action->set_content_margin(SIDE_RIGHT, action_extra_margin);
|
|
@@ -2016,7 +2016,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
// Unpressed icon is dim, so use a dim highlight.
|
|
|
p_theme->set_color("icon_hover_color", "PreviewLightButton", dim_light_highlighted_color);
|
|
|
|
|
|
- p_theme->set_stylebox("normal", "PreviewLightButton", sb_empty_borderless);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "PreviewLightButton", sb_empty_borderless);
|
|
|
p_theme->set_stylebox("hover", "PreviewLightButton", sb_empty_borderless);
|
|
|
p_theme->set_stylebox("focus", "PreviewLightButton", sb_empty_borderless);
|
|
|
p_theme->set_stylebox(SceneStringName(pressed), "PreviewLightButton", sb_empty_borderless);
|
|
@@ -2232,7 +2232,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
style->set_corner_radius(CORNER_BOTTOM_RIGHT, 0);
|
|
|
|
|
|
p_theme->set_type_variation("EditorHelpBitTitle", "RichTextLabel");
|
|
|
- p_theme->set_stylebox("normal", "EditorHelpBitTitle", style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "EditorHelpBitTitle", style);
|
|
|
}
|
|
|
|
|
|
// EditorHelpBitContent.
|
|
@@ -2242,7 +2242,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
|
|
style->set_corner_radius(CORNER_TOP_RIGHT, 0);
|
|
|
|
|
|
p_theme->set_type_variation("EditorHelpBitContent", "RichTextLabel");
|
|
|
- p_theme->set_stylebox("normal", "EditorHelpBitContent", style);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "EditorHelpBitContent", style);
|
|
|
}
|
|
|
|
|
|
// Asset Library.
|
|
@@ -2486,7 +2486,7 @@ void EditorThemeManager::_populate_text_editor_styles(const Ref<EditorTheme> &p_
|
|
|
|
|
|
const Color background_color = EDITOR_GET("text_editor/theme/highlighting/background_color");
|
|
|
Ref<StyleBoxFlat> code_edit_stylebox = make_flat_stylebox(background_color, p_config.widget_margin.x, p_config.widget_margin.y, p_config.widget_margin.x, p_config.widget_margin.y, p_config.corner_radius);
|
|
|
- p_theme->set_stylebox("normal", "CodeEdit", code_edit_stylebox);
|
|
|
+ p_theme->set_stylebox(CoreStringName(normal), "CodeEdit", code_edit_stylebox);
|
|
|
p_theme->set_stylebox("read_only", "CodeEdit", code_edit_stylebox);
|
|
|
p_theme->set_stylebox("focus", "CodeEdit", memnew(StyleBoxEmpty));
|
|
|
|