diff options
Diffstat (limited to 'editor/editor_spin_slider.cpp')
-rw-r--r-- | editor/editor_spin_slider.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index 09e407de57..f23f0cf758 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -303,11 +303,11 @@ void EditorSpinSlider::_draw_spin_slider() { Color lc = get_theme_color(is_read_only() ? SNAME("read_only_label_color") : SNAME("label_color")); if (flat && !label.is_empty()) { - Color label_bg_color = get_theme_color(SNAME("dark_color_3"), SNAME("Editor")); + Ref<StyleBox> label_bg = get_theme_stylebox(SNAME("label_bg"), SNAME("EditorSpinSlider")); if (rtl) { - draw_rect(Rect2(Vector2(size.width - (sb->get_offset().x * 2 + label_width), 0), Vector2(sb->get_offset().x * 2 + label_width, size.height)), label_bg_color); + draw_style_box(label_bg, Rect2(Vector2(size.width - (sb->get_offset().x * 2 + label_width), 0), Vector2(sb->get_offset().x * 2 + label_width, size.height))); } else { - draw_rect(Rect2(Vector2(), Vector2(sb->get_offset().x * 2 + label_width, size.height)), label_bg_color); + draw_style_box(label_bg, Rect2(Vector2(), Vector2(sb->get_offset().x * 2 + label_width, size.height))); } } @@ -448,6 +448,7 @@ void EditorSpinSlider::_notification(int p_what) { if (grabbing_spinner) { grabber->hide(); Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); + Input::get_singleton()->warp_mouse(grabbing_spinner_mouse_pos); grabbing_spinner = false; grabbing_spinner_attempt = false; } @@ -529,7 +530,7 @@ void EditorSpinSlider::_evaluate_input_text() { return; } - Variant v = expr->execute(Array(), nullptr, false); + Variant v = expr->execute(Array(), nullptr, false, true); if (v.get_type() == Variant::NIL) { return; } |