diff options
author | Andreas Haas <Hinsbart@users.noreply.github.com> | 2017-04-14 17:51:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-14 17:51:30 +0200 |
commit | 1a8f94edd413bb6777657c96d8945c8bab9f9fdb (patch) | |
tree | 8b11776f17abcd53b3ee1e99b905ca0d29847a42 | |
parent | 6871ec708fb6475027055a3b54c31bacfdb0339d (diff) | |
parent | 25a4daa5cefb1837578ade283584fcfa333150c8 (diff) |
Merge pull request #8370 from volzhs/fix-stylebox-master
Fix editor style box for ToolButton
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 595c0ecfd8..d7c44e0363 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -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); |