Fix ProgressBar percentage displaying (#2609)
Instead of trying to display floored and rounded ratio as percentage, multiply it by 100 to not always show 0.
This commit is contained in:
@@ -68,7 +68,7 @@ public class ProgressBarComponent implements LayoutableRenderableEntity
|
||||
switch (labelDisplayMode)
|
||||
{
|
||||
case PERCENTAGE:
|
||||
textToWrite = DECIMAL_FORMAT.format(Math.floor(pc)) + "%";
|
||||
textToWrite = DECIMAL_FORMAT.format(Math.floor(pc * 100d)) + "%";
|
||||
break;
|
||||
default:
|
||||
textToWrite = DECIMAL_FORMAT2.format(Math.floor(currentValue)) + "/" + maximum;
|
||||
|
||||
Reference in New Issue
Block a user