summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-11 08:01:54 +0100
committerGitHub <noreply@github.com>2017-12-11 08:01:54 +0100
commit378bb896780acdcf1831c42286a018c5515ed356 (patch)
treeffa2600c2c3f763104a83fb4e825d73848e1e8f4 /editor
parent82b702d5da6c1f826e61d3e0e24a1da4a3aebcd2 (diff)
parent2afa2bc389ca5371ec4f659041ac4097f23fbac7 (diff)
Merge pull request #14541 from volzhs/fix-checkbutton
Fix CheckButton & CheckBox minimum size
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_themes.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 8b9c261f8b..152eda7d91 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -587,9 +587,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Checkbox
Ref<StyleBoxFlat> sb_checkbox = style_menu->duplicate();
- // HACK, in reality, the checkbox draws the text over the icon by default, so the margin compensates that.
- const int cb_w = theme->get_icon("GuiChecked", "EditorIcons")->get_width() + default_margin_size;
- sb_checkbox->set_default_margin(MARGIN_LEFT, cb_w * EDSCALE);
+ sb_checkbox->set_default_margin(MARGIN_LEFT, default_margin_size * EDSCALE);
sb_checkbox->set_default_margin(MARGIN_RIGHT, default_margin_size * EDSCALE);
sb_checkbox->set_default_margin(MARGIN_TOP, default_margin_size * EDSCALE);
sb_checkbox->set_default_margin(MARGIN_BOTTOM, default_margin_size * EDSCALE);