diff options
Diffstat (limited to 'scene/theme/default_theme.cpp')
-rw-r--r-- | scene/theme/default_theme.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/scene/theme/default_theme.cpp b/scene/theme/default_theme.cpp index aa4d669238..630a6a43e0 100644 --- a/scene/theme/default_theme.cpp +++ b/scene/theme/default_theme.cpp @@ -147,7 +147,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const } // Panel - theme->set_stylebox("panel", "Panel", make_flat_stylebox(style_normal_color, 0, 0, 0, 0)); + theme->set_stylebox(SceneStringName(panel), "Panel", make_flat_stylebox(style_normal_color, 0, 0, 0, 0)); // Button @@ -617,7 +617,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const Ref<StyleBoxEmpty> empty; empty.instantiate(); - theme->set_stylebox("panel", "ScrollContainer", empty); + theme->set_stylebox(SceneStringName(panel), "ScrollContainer", empty); // Window @@ -640,7 +640,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const // Dialogs // AcceptDialog is currently the base dialog, so this defines styles for all extending nodes. - theme->set_stylebox("panel", "AcceptDialog", make_flat_stylebox(style_popup_color, Math::round(8 * scale), Math::round(8 * scale), Math::round(8 * scale), Math::round(8 * scale), 0)); + theme->set_stylebox(SceneStringName(panel), "AcceptDialog", make_flat_stylebox(style_popup_color, Math::round(8 * scale), Math::round(8 * scale), Math::round(8 * scale), Math::round(8 * scale), 0)); theme->set_constant("buttons_separation", "AcceptDialog", Math::round(10 * scale)); // File Dialog @@ -659,11 +659,11 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const // Popup - theme->set_stylebox("panel", "PopupPanel", make_flat_stylebox(style_normal_color)); + theme->set_stylebox(SceneStringName(panel), "PopupPanel", make_flat_stylebox(style_normal_color)); // PopupDialog - theme->set_stylebox("panel", "PopupDialog", make_flat_stylebox(style_normal_color)); + theme->set_stylebox(SceneStringName(panel), "PopupDialog", make_flat_stylebox(style_normal_color)); // PopupMenu @@ -680,7 +680,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const style_popup_panel->set_border_width_all(2); style_popup_panel->set_border_color(style_popup_border_color); - theme->set_stylebox("panel", "PopupMenu", style_popup_panel); + theme->set_stylebox(SceneStringName(panel), "PopupMenu", style_popup_panel); theme->set_stylebox("hover", "PopupMenu", make_flat_stylebox(style_popup_hover_color)); theme->set_stylebox("separator", "PopupMenu", separator_horizontal); theme->set_stylebox("labeled_separator_left", "PopupMenu", separator_horizontal); @@ -731,7 +731,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const graphn_sb_titlebar_selected->set_bg_color(Color(1.0, 0.625, 0.625, 0.6)); Ref<StyleBoxEmpty> graphnode_slot = make_empty_stylebox(0, 0, 0, 0); - theme->set_stylebox("panel", "GraphNode", graphnode_normal); + theme->set_stylebox(SceneStringName(panel), "GraphNode", graphnode_normal); theme->set_stylebox("panel_selected", "GraphNode", graphnode_selected); theme->set_stylebox("titlebar", "GraphNode", graphn_sb_titlebar); theme->set_stylebox("titlebar_selected", "GraphNode", graphn_sb_titlebar_selected); @@ -766,7 +766,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const Ref<StyleBoxFlat> graphframe_sb_selected = graphframe_sb->duplicate(); graphframe_sb_selected->set_border_color(style_hover_color); - theme->set_stylebox("panel", "GraphFrame", graphframe_sb); + theme->set_stylebox(SceneStringName(panel), "GraphFrame", graphframe_sb); theme->set_stylebox("panel_selected", "GraphFrame", graphframe_sb_selected); theme->set_stylebox("titlebar", "GraphFrame", make_empty_stylebox(4, 4, 4, 4)); theme->set_stylebox("titlebar_selected", "GraphFrame", make_empty_stylebox(4, 4, 4, 4)); @@ -790,7 +790,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const // Tree - theme->set_stylebox("panel", "Tree", make_flat_stylebox(style_normal_color, 4, 4, 4, 5)); + theme->set_stylebox(SceneStringName(panel), "Tree", make_flat_stylebox(style_normal_color, 4, 4, 4, 5)); theme->set_stylebox("focus", "Tree", focus); theme->set_stylebox("selected", "Tree", make_flat_stylebox(style_selected_color)); theme->set_stylebox("selected_focus", "Tree", make_flat_stylebox(style_selected_color)); @@ -860,7 +860,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const // ItemList - theme->set_stylebox("panel", "ItemList", make_flat_stylebox(style_normal_color)); + theme->set_stylebox(SceneStringName(panel), "ItemList", make_flat_stylebox(style_normal_color)); theme->set_stylebox("focus", "ItemList", focus); theme->set_constant("h_separation", "ItemList", Math::round(4 * scale)); theme->set_constant("v_separation", "ItemList", Math::round(4 * scale)); @@ -904,7 +904,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_stylebox("tab_unselected", "TabContainer", style_tab_unselected); theme->set_stylebox("tab_disabled", "TabContainer", style_tab_disabled); theme->set_stylebox("tab_focus", "TabContainer", style_tab_focus); - theme->set_stylebox("panel", "TabContainer", make_flat_stylebox(style_normal_color, 0, 0, 0, 0)); + theme->set_stylebox(SceneStringName(panel), "TabContainer", make_flat_stylebox(style_normal_color, 0, 0, 0, 0)); theme->set_stylebox("tabbar_background", "TabContainer", make_empty_stylebox(0, 0, 0, 0)); theme->set_icon("increment", "TabContainer", icons["scroll_button_right"]); @@ -1083,7 +1083,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const // TooltipPanel + TooltipLabel theme->set_type_variation("TooltipPanel", "PopupPanel"); - theme->set_stylebox("panel", "TooltipPanel", + theme->set_stylebox(SceneStringName(panel), "TooltipPanel", make_flat_stylebox(Color(0, 0, 0, 0.5), 2 * default_margin, 0.5 * default_margin, 2 * default_margin, 0.5 * default_margin)); theme->set_type_variation("TooltipLabel", "Label"); @@ -1171,7 +1171,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("h_separation", "VFlowContainer", Math::round(4 * scale)); theme->set_constant("v_separation", "VFlowContainer", Math::round(4 * scale)); - theme->set_stylebox("panel", "PanelContainer", make_flat_stylebox(style_normal_color, 0, 0, 0, 0)); + theme->set_stylebox(SceneStringName(panel), "PanelContainer", make_flat_stylebox(style_normal_color, 0, 0, 0, 0)); theme->set_icon("zoom_out", "GraphEdit", icons["zoom_less"]); theme->set_icon("zoom_in", "GraphEdit", icons["zoom_more"]); @@ -1181,7 +1181,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_icon("snapping_toggle", "GraphEdit", icons["grid_snap"]); theme->set_icon("layout", "GraphEdit", icons["grid_layout"]); - theme->set_stylebox("panel", "GraphEdit", make_flat_stylebox(style_normal_color, 4, 4, 4, 5)); + theme->set_stylebox(SceneStringName(panel), "GraphEdit", make_flat_stylebox(style_normal_color, 4, 4, 4, 5)); Ref<StyleBoxFlat> graph_toolbar_style = make_flat_stylebox(Color(0.24, 0.24, 0.24, 0.6), 4, 2, 4, 2); theme->set_stylebox("menu_panel", "GraphEdit", graph_toolbar_style); @@ -1200,7 +1200,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("port_hotzone_inner_extent", "GraphEdit", 22 * scale); theme->set_constant("port_hotzone_outer_extent", "GraphEdit", 26 * scale); - theme->set_stylebox("panel", "GraphEditMinimap", make_flat_stylebox(Color(0.24, 0.24, 0.24), 0, 0, 0, 0)); + theme->set_stylebox(SceneStringName(panel), "GraphEditMinimap", make_flat_stylebox(Color(0.24, 0.24, 0.24), 0, 0, 0, 0)); Ref<StyleBoxFlat> style_minimap_camera = make_flat_stylebox(Color(0.65, 0.65, 0.65, 0.2), 0, 0, 0, 0, 0); style_minimap_camera->set_border_color(Color(0.65, 0.65, 0.65, 0.45)); style_minimap_camera->set_border_width_all(1); |