diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/progress_bar.cpp | 2 | ||||
-rw-r--r-- | scene/gui/scroll_container.cpp | 1 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp index 1344d010ae..c111ddff58 100644 --- a/scene/gui/progress_bar.cpp +++ b/scene/gui/progress_bar.cpp @@ -74,7 +74,7 @@ void ProgressBar::_notification(int p_what) { if (percent_visible) { String txt = TS->format_number(itos(int(get_as_ratio() * 100))) + TS->percent_sign(); TextLine tl = TextLine(txt, font, font_size); - tl.draw(get_canvas_item(), Point2(get_size().width - tl.get_size().x, get_size().height - tl.get_size().y) / 2, font_color); + tl.draw(get_canvas_item(), (Point2(get_size().width - tl.get_size().x, get_size().height - tl.get_size().y) / 2).round(), font_color); } } } diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 3a54ac7443..4110a971c8 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -328,6 +328,7 @@ void ScrollContainer::_notification(int p_what) { if (rtl && v_scroll->is_visible_in_tree() && v_scroll->get_parent() == this) { r.position.x += v_scroll->get_minimum_size().x; } + r.position = r.position.floor(); fit_child_in_rect(c, r); } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index f3569f9ce3..bf7e82e87c 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1245,7 +1245,7 @@ void TextEdit::_notification(int p_what) { int gl_size = visual.size(); ofs_y += ldata->get_line_ascent(line_wrap_index); - float char_ofs = 0.f; + int char_ofs = 0; for (int j = 0; j < gl_size; j++) { if (color_map.has(glyphs[j].start)) { current_color = color_map[glyphs[j].start].get("color"); |