Added some improvements

This commit is contained in:
Robert Vokac 2024-03-09 19:47:51 +00:00
parent 8681968d96
commit 9e23593fb3
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055

View File

@ -229,9 +229,10 @@ public class Battery extends Widget {
brush.setFont(currentFont); brush.setFont(currentFont);
} }
if (circleProgressVisibleProperty.isEnabled()) {
paintCircleProgress(brush, visibility); }
} if (circleProgressVisibleProperty.isEnabled()) {
paintCircleProgress(brush, visibility);
} }
if (donePercent > 0) { if (donePercent > 0) {
@ -246,8 +247,8 @@ public class Battery extends Widget {
if (percentProgressVisibleProperty.isEnabled()) { if (percentProgressVisibleProperty.isEnabled()) {
brush.drawString( brush.drawString(
NumberFormats.FORMATTER_THREE_DECIMAL_PLACES (donePercent == 1 ? 100 : (NumberFormats.FORMATTER_THREE_DECIMAL_PLACES
.format(donePercent * 100) + "%", .format(donePercent * 100))) + "%",
((int) (totalWidth * 0.15)), ((int) (totalWidth * 0.15)),
donePercent > 0.5 ? totalHeight / 4 * 3 : donePercent > 0.5 ? totalHeight / 4 * 3 :
totalHeight / 4 * 1); totalHeight / 4 * 1);