diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-23 18:24:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 18:24:00 +0100 |
commit | c4c211c3b7608f79457f16bb42ad8839a9cdcf5a (patch) | |
tree | b623ca5f4ac718466a13cf50659b1486cb6681c9 /editor/editor_spin_slider.cpp | |
parent | 1e08647195a690d14666443b7691d8406a7e73b7 (diff) | |
parent | 4b8b8039316493ee3fa77c6bb93f95e109fa68a6 (diff) |
Merge pull request #44605 from madmiraal/rename-control-margin
Rename Control margin to offset
Diffstat (limited to 'editor/editor_spin_slider.cpp')
-rw-r--r-- | editor/editor_spin_slider.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index d72510d40d..4a37d26a26 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -202,7 +202,7 @@ void EditorSpinSlider::_notification(int p_what) { // EditorSpinSliders with a label have more space on the left, so add an // higher margin to match the location where the text begins. // The margin values below were determined by empirical testing. - stylebox->set_default_margin(MARGIN_LEFT, (get_label() != String() ? 23 : 16) * EDSCALE); + stylebox->set_default_margin(SIDE_LEFT, (get_label() != String() ? 23 : 16) * EDSCALE); value_input->add_theme_style_override("normal", stylebox); } @@ -256,7 +256,7 @@ void EditorSpinSlider::_notification(int p_what) { if (get_step() == 1) { Ref<Texture2D> updown2 = get_theme_icon("updown", "SpinBox"); int updown_vofs = (get_size().height - updown2->get_height()) / 2; - updown_offset = get_size().width - sb->get_margin(MARGIN_RIGHT) - updown2->get_width(); + updown_offset = get_size().width - sb->get_margin(SIDE_RIGHT) - updown2->get_width(); Color c(1, 1, 1); if (hover_updown) { c *= Color(1.2, 1.2, 1.2); @@ -500,7 +500,7 @@ EditorSpinSlider::EditorSpinSlider() { value_input = memnew(LineEdit); value_input_popup->add_child(value_input); value_input_popup->set_wrap_controls(true); - value_input->set_anchors_and_margins_preset(PRESET_WIDE); + value_input->set_anchors_and_offsets_preset(PRESET_WIDE); value_input_popup->connect("popup_hide", callable_mp(this, &EditorSpinSlider::_value_input_closed)); value_input->connect("text_entered", callable_mp(this, &EditorSpinSlider::_value_input_entered)); value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited)); |