Reused Button styleboxes for ButtonArray

Plus other tweaks to make it look more similar to a VBoxContainer of
Buttons.

(cherry picked from commit 191fdc873e)
This commit is contained in:
Zher Huei Lee 2016-11-19 22:07:12 +08:00 committed by Rémi Verschelde
parent fe81402257
commit 17399de0e1

View file

@ -871,10 +871,9 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F
// 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);
@ -882,17 +881,17 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F
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);
@ -900,8 +899,8 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F
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 );