diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-12-17 13:22:04 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-12-21 07:49:27 +0200 |
commit | 1adea98d070783c8b5a560eeb1f9ca636db28514 (patch) | |
tree | 2ae4495d3cb1940032b296b06f0a5e480298e559 /scene/gui/progress_bar.cpp | |
parent | 7d5a8ea0e9c22b5e9b513de6ceb49f34fe120cc3 (diff) | |
download | redot-engine-1adea98d070783c8b5a560eeb1f9ca636db28514.tar.gz |
Use integer text position in scroll container, TextEdit and canvas editor, to ensure sharp text rendering.
Use integer font align/advance with any font scaling, to ensure sharp text rendering.
Diffstat (limited to 'scene/gui/progress_bar.cpp')
-rw-r--r-- | scene/gui/progress_bar.cpp | 2 |
1 files changed, 1 insertions, 1 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); } } } |