Reused Button styleboxes for ButtonArray
Plus other tweaks to make it look more similar to a VBoxContainer of Buttons.
This commit is contained in:
parent
4b7443aeea
commit
191fdc873e
1 changed files with 10 additions and 11 deletions
|
@ -899,10 +899,9 @@ void fill_default_theme(Ref<Theme>& t, const Ref<Font> & default_font, const Ref
|
||||||
|
|
||||||
|
|
||||||
// HButtonArray
|
// HButtonArray
|
||||||
|
t->set_stylebox("normal","HButtonArray", sb_button_normal);
|
||||||
t->set_stylebox("normal","HButtonArray", make_stylebox( button_normal_png,4,4,4,4,0,4,22,4) );
|
t->set_stylebox("selected","HButtonArray", sb_button_pressed);
|
||||||
t->set_stylebox("selected","HButtonArray", make_stylebox( button_pressed_png,4,4,4,4,0,4,22,4) );
|
t->set_stylebox("hover","HButtonArray", sb_button_hover);
|
||||||
t->set_stylebox("hover","HButtonArray", make_stylebox( button_hover_png,4,4,4,4) );
|
|
||||||
|
|
||||||
t->set_font("font","HButtonArray", default_font);
|
t->set_font("font","HButtonArray", default_font);
|
||||||
t->set_font("font_selected","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","HButtonArray", control_font_color_low );
|
||||||
t->set_color("font_color_selected","HButtonArray", control_font_color_hover );
|
t->set_color("font_color_selected","HButtonArray", control_font_color_hover );
|
||||||
|
|
||||||
t->set_constant("icon_separator","HButtonArray", 4 *scale );
|
t->set_constant("icon_separator","HButtonArray", 2 *scale );
|
||||||
t->set_constant("button_separator","HButtonArray", 8 *scale );
|
t->set_constant("button_separator","HButtonArray", 4 *scale );
|
||||||
|
|
||||||
t->set_stylebox("focus","HButtonArray", focus );
|
t->set_stylebox("focus","HButtonArray", focus );
|
||||||
|
|
||||||
|
|
||||||
// VButtonArray
|
// VButtonArray
|
||||||
|
|
||||||
t->set_stylebox("normal","VButtonArray", make_stylebox( button_normal_png,4,4,4,4,0,4,22,4) );
|
t->set_stylebox("normal","VButtonArray", sb_button_normal);
|
||||||
t->set_stylebox("selected","VButtonArray", make_stylebox( button_pressed_png,4,4,4,4,0,4,22,4) );
|
t->set_stylebox("selected","VButtonArray", sb_button_pressed);
|
||||||
t->set_stylebox("hover","VButtonArray", make_stylebox( button_hover_png,4,4,4,4) );
|
t->set_stylebox("hover","VButtonArray", sb_button_hover);
|
||||||
|
|
||||||
t->set_font("font","VButtonArray", default_font);
|
t->set_font("font","VButtonArray", default_font);
|
||||||
t->set_font("font_selected","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","VButtonArray", control_font_color_low );
|
||||||
t->set_color("font_color_selected","VButtonArray", control_font_color_hover );
|
t->set_color("font_color_selected","VButtonArray", control_font_color_hover );
|
||||||
|
|
||||||
t->set_constant("icon_separator","VButtonArray", 4 *scale);
|
t->set_constant("icon_separator","VButtonArray", 2 *scale);
|
||||||
t->set_constant("button_separator","VButtonArray", 8 *scale);
|
t->set_constant("button_separator","VButtonArray", 4 *scale);
|
||||||
|
|
||||||
t->set_stylebox("focus","VButtonArray", focus );
|
t->set_stylebox("focus","VButtonArray", focus );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue