summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-10-24 16:17:02 +0200
committerGitHub <noreply@github.com>2019-10-24 16:17:02 +0200
commit9d347a2f2487d28cee8d11ed9a7ac7615b4c91f3 (patch)
tree7781b4aebe5373eef6fedafd80d7300d488432e5
parent091c37d921c495bd9d21054e90c63078bf8970d5 (diff)
parentf8a81e21db535d960f230e1ecff01e4c5300cfdf (diff)
Merge pull request #33031 from volzhs/inspector-font
Fix incorrect text rendering with smaller display scale
-rw-r--r--editor/editor_spin_slider.cpp4
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");