Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Oct 26, 2021
1 parent 2cc18d3 commit ddb3ead
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/eez/gui/widgets/progress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ DrawFunctionType PROGRESS_draw = [](const WidgetCursor &widgetCursor) {
percentTo = widgetCursor.currentState->data.getInt();
}

percentFrom = clamp(percentFrom, 0, 100.0f);

auto isHorizontal = widget->w > widget->h;
if (isHorizontal) {
auto xFrom = percentFrom * widget->w / 100;
Expand Down

0 comments on commit ddb3ead

Please sign in to comment.