summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorZher Huei Lee <lee.zh.92@gmail.com>2016-11-19 22:07:12 +0800
committerZher Huei Lee <lee.zh.92@gmail.com>2016-11-19 22:07:12 +0800
commit191fdc873edf922bc4a19a5b4f32a2d21bcdaffe (patch)
treea40f3a98bb96b7318316c5505d8d4dd9766e34af /scene
parent4b7443aeea13bd007329adba418e60e36dead2ec (diff)
Reused Button styleboxes for ButtonArray
Plus other tweaks to make it look more similar to a VBoxContainer of Buttons.
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/default_theme/default_theme.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 4c759bddef..439b5fa66f 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -899,10 +899,9 @@ void fill_default_theme(Ref<Theme>& t, const Ref<Font> & default_font, const Ref
// HButtonArray
-
- t->set_stylebox("normal","HButtonArray", make_stylebox( button_normal_png,4,4,4,4,0,4,22,4) );
- t->set_stylebox("selected","HButtonArray", make_stylebox( button_pressed_png,4,4,4,4,0,4,22,4) );
- t->set_stylebox("hover","HButtonArray", make_stylebox( button_hover_png,4,4,4,4) );
+ t->set_stylebox("normal","HButtonArray", sb_button_normal);
+ t->set_stylebox("selected","HButtonArray", sb_button_pressed);
+ t->set_stylebox("hover","HButtonArray", sb_button_hover);
t->set_font("font","HButtonArray", default_font);
t->set_font("font_selected","HButtonArray", default_font);
@@ -910,17 +909,17 @@ void fill_default_theme(Ref<Theme>& t, const Ref<Font> & default_font, const Ref
t->set_color("font_color","HButtonArray", control_font_color_low );
t->set_color("font_color_selected","HButtonArray", control_font_color_hover );
- t->set_constant("icon_separator","HButtonArray", 4 *scale );
- t->set_constant("button_separator","HButtonArray", 8 *scale );
+ t->set_constant("icon_separator","HButtonArray", 2 *scale );
+ t->set_constant("button_separator","HButtonArray", 4 *scale );
t->set_stylebox("focus","HButtonArray", focus );
// VButtonArray
- t->set_stylebox("normal","VButtonArray", make_stylebox( button_normal_png,4,4,4,4,0,4,22,4) );
- t->set_stylebox("selected","VButtonArray", make_stylebox( button_pressed_png,4,4,4,4,0,4,22,4) );
- t->set_stylebox("hover","VButtonArray", make_stylebox( button_hover_png,4,4,4,4) );
+ t->set_stylebox("normal","VButtonArray", sb_button_normal);
+ t->set_stylebox("selected","VButtonArray", sb_button_pressed);
+ t->set_stylebox("hover","VButtonArray", sb_button_hover);
t->set_font("font","VButtonArray", default_font);
t->set_font("font_selected","VButtonArray", default_font);
@@ -928,8 +927,8 @@ void fill_default_theme(Ref<Theme>& t, const Ref<Font> & default_font, const Ref
t->set_color("font_color","VButtonArray", control_font_color_low );
t->set_color("font_color_selected","VButtonArray", control_font_color_hover );
- t->set_constant("icon_separator","VButtonArray", 4 *scale);
- t->set_constant("button_separator","VButtonArray", 8 *scale);
+ t->set_constant("icon_separator","VButtonArray", 2 *scale);
+ t->set_constant("button_separator","VButtonArray", 4 *scale);
t->set_stylebox("focus","VButtonArray", focus );