From 752402cf354a105496ed9a86038f83f56d0706fd Mon Sep 17 00:00:00 2001
From: Yuri Sizov <yuris@humnom.net>
Date: Thu, 19 Jan 2023 19:14:09 +0300
Subject: Clean-up, harmonize, and improve StyleBox API

- Make all margin properties follow the same naming convention (their getter and setter too).
- Remove a virtual counterpart of `get_style_margin` from API.
- Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
---
 editor/editor_spin_slider.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'editor/editor_spin_slider.cpp')

diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 177266e366..54e14074d9 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);
-- 
cgit v1.2.3