Skip to content

Commit

Permalink
Fix battery widget percentage display
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrapha committed Aug 7, 2019
1 parent 4d87e3a commit 6a19697
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widget/wbattery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ QString formatMinutes(int minutes) {

int pixmapIndexFromPercentage(double dPercentage, int numPixmaps) {
// See WDisplay::getActivePixmapIndex for more info on this.
int result = static_cast<int>(dPercentage * numPixmaps - 0.00001);
int result = static_cast<int>(dPercentage * numPixmaps - 0.00001) / 100;
result = math_min(numPixmaps - 1, math_max(0, result));
return result;
}
Expand Down

0 comments on commit 6a19697

Please sign in to comment.