From 4c451676d9c93e7280ec8732f0923a9e0ab70006 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Sat, 12 May 2018 19:25:13 +0200 Subject: [PATCH] Do not floor percentage in progress bars Closes #2614 Signed-off-by: Tomas Slusny --- .../client/ui/overlay/components/ProgressBarComponent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/components/ProgressBarComponent.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/components/ProgressBarComponent.java index 2e18be8274..dc61f9c4ec 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/components/ProgressBarComponent.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/components/ProgressBarComponent.java @@ -42,7 +42,7 @@ public class ProgressBarComponent implements LayoutableRenderableEntity } private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.0"); - private static final DecimalFormat DECIMAL_FORMAT2 = new DecimalFormat("#0"); + private static final DecimalFormat DECIMAL_FORMAT_ABS = new DecimalFormat("#0"); private long minimum; private long maximum = 100; private double value; @@ -68,10 +68,10 @@ public class ProgressBarComponent implements LayoutableRenderableEntity switch (labelDisplayMode) { case PERCENTAGE: - textToWrite = DECIMAL_FORMAT.format(Math.floor(pc * 100d)) + "%"; + textToWrite = DECIMAL_FORMAT.format(pc * 100d) + "%"; break; default: - textToWrite = DECIMAL_FORMAT2.format(Math.floor(currentValue)) + "/" + maximum; + textToWrite = DECIMAL_FORMAT_ABS.format(Math.floor(currentValue)) + "/" + maximum; } final int width = preferredSize.width;