summaryrefslogtreecommitdiff
path: root/editor/editor_spin_slider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_spin_slider.cpp')
-rw-r--r--editor/editor_spin_slider.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 177266e366..2d3ec437c6 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -278,11 +278,11 @@ void EditorSpinSlider::_update_value_input_stylebox() {
// higher margin to match the location where the text begins.
// The margin values below were determined by empirical testing.
if (is_layout_rtl()) {
- stylebox->set_default_margin(SIDE_LEFT, 0);
- stylebox->set_default_margin(SIDE_RIGHT, (!get_label().is_empty() ? 23 : 16) * EDSCALE);
+ stylebox->set_content_margin(SIDE_LEFT, 0);
+ stylebox->set_content_margin(SIDE_RIGHT, (!get_label().is_empty() ? 23 : 16) * EDSCALE);
} else {
- stylebox->set_default_margin(SIDE_LEFT, (!get_label().is_empty() ? 23 : 16) * EDSCALE);
- stylebox->set_default_margin(SIDE_RIGHT, 0);
+ stylebox->set_content_margin(SIDE_LEFT, (!get_label().is_empty() ? 23 : 16) * EDSCALE);
+ stylebox->set_content_margin(SIDE_RIGHT, 0);
}
value_input->add_theme_style_override("normal", stylebox);
@@ -367,7 +367,6 @@ void EditorSpinSlider::_draw_spin_slider() {
if (!hide_slider) {
if (get_step() == 1) {
- number_width -= updown->get_width();
Ref<Texture2D> updown2 = get_theme_icon(is_read_only() ? SNAME("updown_disabled") : SNAME("updown"), SNAME("SpinBox"));
int updown_vofs = (size.height - updown2->get_height()) / 2;
if (rtl) {