summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-31 11:35:47 +0200
committerGitHub <noreply@github.com>2019-07-31 11:35:47 +0200
commitf34998023da5d26543e34e0af0cbecbd062c54ac (patch)
tree37a1fd3025248738caaed800743f0b643a30d0d9 /scene/gui
parent0636e664ff310671755d0693f70a776ca34365fe (diff)
parent7db96e22dd2b6f52df2474e750d9b8445d23c137 (diff)
Merge pull request #30986 from sparkart/fix_progressbar_border_error
Fix ProgressBar Wrong Value with Border
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/progress_bar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp
index 264eda4035..0154a452ad 100644
--- a/scene/gui/progress_bar.cpp
+++ b/scene/gui/progress_bar.cpp
@@ -60,7 +60,7 @@ void ProgressBar::_notification(int p_what) {
draw_style_box(bg, Rect2(Point2(), get_size()));
float r = get_as_ratio();
int mp = fg->get_minimum_size().width;
- int p = r * get_size().width - mp;
+ int p = r * (get_size().width - mp);
if (p > 0) {
draw_style_box(fg, Rect2(Point2(), Size2(p + fg->get_minimum_size().width, get_size().height)));