You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Rename Control margin to offset
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user