diff --git a/app/src/main/java/com/androidexperiments/meter/drawers/BatteryDrawer.java b/app/src/main/java/com/androidexperiments/meter/drawers/BatteryDrawer.java index 7f06b57..c21d897 100644 --- a/app/src/main/java/com/androidexperiments/meter/drawers/BatteryDrawer.java +++ b/app/src/main/java/com/androidexperiments/meter/drawers/BatteryDrawer.java @@ -180,7 +180,7 @@ public void draw(Canvas c){ int fgCircleColor = interpolateColor(color_foreground_decharge, color_foreground_charging, (float) lerp(_colorTransitionToCharged)); fgCircleColor = interpolateColor(fgCircleColor, color_foreground_critical, (float) lerp(_colorTransitionToCritical)); paint.setColor(fgCircleColor); - c.drawCircle((float)(x+c.getWidth()*pos.getX()),(float)(y+c.getWidth()*pos.getY()), _circleSize*batteryPct, paint); + c.drawCircle((float)(x+c.getWidth()*pos.getX()),(float)(y+c.getWidth()*pos.getY()), (float) Math.sqrt(_circleSize*_circleSize*batteryPct), paint); // Text String label1 = "Battery " + Integer.toString(Math.round(batteryPct*100)) + "%";