summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2017-12-11 14:03:32 +0900
committervolzhs <volzhs@gmail.com>2017-12-11 14:52:32 +0900
commit3c04d7798c7d7e510f8dadf5b305b534c0bce452 (patch)
tree786c095574a234b232d5144c536a3e34731bf590 /editor
parentc05c66ee01bcf285d5b4d952fb24c15af281803d (diff)
Fix CheckButton 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);