mirror of
https://github.com/godotengine/godot.git
synced 2024-12-12 22:25:01 +00:00
Fix editor style box for ToolButton
This commit is contained in:
parent
09ed1113fa
commit
25a4daa5ce
@ -284,16 +284,10 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
|
||||
|
||||
// ToolButton
|
||||
|
||||
Ref<StyleBox> tb_empty = memnew(StyleBoxEmpty);
|
||||
tb_empty->set_default_margin(MARGIN_LEFT, 6 * scale);
|
||||
tb_empty->set_default_margin(MARGIN_RIGHT, 6 * scale);
|
||||
tb_empty->set_default_margin(MARGIN_TOP, 4 * scale);
|
||||
tb_empty->set_default_margin(MARGIN_BOTTOM, 4 * scale);
|
||||
|
||||
t->set_stylebox("normal", "ToolButton", tb_empty);
|
||||
t->set_stylebox("pressed", "ToolButton", make_stylebox(button_pressed_png, 4, 4, 4, 4));
|
||||
t->set_stylebox("hover", "ToolButton", make_stylebox(button_normal_png, 4, 4, 4, 4));
|
||||
t->set_stylebox("disabled", "ToolButton", make_empty_stylebox(4, 4, 4, 4));
|
||||
t->set_stylebox("normal", "ToolButton", make_empty_stylebox(6, 4, 6, 4));
|
||||
t->set_stylebox("pressed", "ToolButton", make_stylebox(button_pressed_png, 4, 4, 4, 4, 6, 4, 6, 4));
|
||||
t->set_stylebox("hover", "ToolButton", make_stylebox(button_normal_png, 4, 4, 4, 4, 6, 4, 6, 4));
|
||||
t->set_stylebox("disabled", "ToolButton", make_empty_stylebox(6, 4, 6, 4));
|
||||
t->set_stylebox("focus", "ToolButton", focus);
|
||||
t->set_font("font", "ToolButton", default_font);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user