Explorar o código

Merge pull request #33031 from volzhs/inspector-font

Fix incorrect text rendering with smaller display scale
Rémi Verschelde %!s(int64=5) %!d(string=hai) anos
pai
achega
9d347a2f24
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      editor/editor_spin_slider.cpp

+ 2 - 2
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");