diff options
author | volzhs <volzhs@gmail.com> | 2019-10-24 22:29:41 +0900 |
---|---|---|
committer | volzhs <volzhs@gmail.com> | 2019-10-24 22:29:41 +0900 |
commit | f8a81e21db535d960f230e1ecff01e4c5300cfdf (patch) | |
tree | 69a7b07d75477bdacd6f3fc488cea42b7d028422 | |
parent | 79dae3a87e1c8a66897fc1816059f39c8f25cde4 (diff) |
Fix incorrect text rendering with smaller display scale
-rw-r--r-- | editor/editor_spin_slider.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index 918b0ef96d..d80176f00d 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -228,9 +228,9 @@ void EditorSpinSlider::_notification(int p_what) { draw_style_box(focus, Rect2(Vector2(), get_size())); } - draw_string(font, Vector2(sb->get_offset().x, vofs), label, lc * Color(1, 1, 1, 0.5)); + draw_string(font, Vector2(Math::round(sb->get_offset().x), vofs), label, lc * Color(1, 1, 1, 0.5)); - draw_string(font, Vector2(sb->get_offset().x + string_width + sep, vofs), numstr, fc, number_width); + draw_string(font, Vector2(Math::round(sb->get_offset().x + string_width + sep), vofs), numstr, fc, number_width); if (get_step() == 1) { Ref<Texture> updown2 = get_icon("updown", "SpinBox"); |