Skip to content

Commit

Permalink
Fix ProgressBar widget overflow (#1288)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotherNgineer committed Jul 21, 2023
1 parent 8ce48db commit 2af9545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/common/ui_widget.cpp
Expand Up @@ -573,7 +573,7 @@ void ProgressBar::paint(Painter& painter) {
const auto sr = screen_rect();
const auto s = style();

v_scaled = (sr.size().width() * _value) / _max;
v_scaled = (sr.size().width() * (uint64_t)_value) / _max;

painter.fill_rectangle({sr.location(), {v_scaled, sr.size().height()}}, style().foreground);
painter.fill_rectangle({{sr.location().x() + v_scaled, sr.location().y()}, {sr.size().width() - v_scaled, sr.size().height()}}, s.background);
Expand Down

0 comments on commit 2af9545

Please sign in to comment.