diff options
Diffstat (limited to 'scene/gui/check_box.cpp')
-rw-r--r-- | scene/gui/check_box.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp index 0c78369688..bb274195f4 100644 --- a/scene/gui/check_box.cpp +++ b/scene/gui/check_box.cpp @@ -62,7 +62,7 @@ Size2 CheckBox::get_minimum_size() const { minsize.width += get_theme_constant("hseparation"); } Ref<StyleBox> sb = get_theme_stylebox("normal"); - minsize.height = MAX(minsize.height, tex_size.height + sb->get_margin(MARGIN_TOP) + sb->get_margin(MARGIN_BOTTOM)); + minsize.height = MAX(minsize.height, tex_size.height + sb->get_margin(SIDE_TOP) + sb->get_margin(SIDE_BOTTOM)); return minsize; } @@ -70,11 +70,11 @@ Size2 CheckBox::get_minimum_size() const { void CheckBox::_notification(int p_what) { if ((p_what == NOTIFICATION_THEME_CHANGED) || (p_what == NOTIFICATION_LAYOUT_DIRECTION_CHANGED || (p_what == NOTIFICATION_TRANSLATION_CHANGED))) { if (is_layout_rtl()) { - _set_internal_margin(MARGIN_LEFT, 0.f); - _set_internal_margin(MARGIN_RIGHT, get_icon_size().width); + _set_internal_margin(SIDE_LEFT, 0.f); + _set_internal_margin(SIDE_RIGHT, get_icon_size().width); } else { - _set_internal_margin(MARGIN_LEFT, get_icon_size().width); - _set_internal_margin(MARGIN_RIGHT, 0.f); + _set_internal_margin(SIDE_LEFT, get_icon_size().width); + _set_internal_margin(SIDE_RIGHT, 0.f); } } else if (p_what == NOTIFICATION_DRAW) { RID ci = get_canvas_item(); @@ -85,9 +85,9 @@ void CheckBox::_notification(int p_what) { Vector2 ofs; if (is_layout_rtl()) { - ofs.x = get_size().x - sb->get_margin(MARGIN_RIGHT) - get_icon_size().width; + ofs.x = get_size().x - sb->get_margin(SIDE_RIGHT) - get_icon_size().width; } else { - ofs.x = sb->get_margin(MARGIN_LEFT); + ofs.x = sb->get_margin(SIDE_LEFT); } ofs.y = int((get_size().height - get_icon_size().height) / 2) + get_theme_constant("check_vadjust"); @@ -110,9 +110,9 @@ CheckBox::CheckBox(const String &p_text) : set_text_align(ALIGN_LEFT); if (is_layout_rtl()) { - _set_internal_margin(MARGIN_RIGHT, get_icon_size().width); + _set_internal_margin(SIDE_RIGHT, get_icon_size().width); } else { - _set_internal_margin(MARGIN_LEFT, get_icon_size().width); + _set_internal_margin(SIDE_LEFT, get_icon_size().width); } } |