From b88713cbbf31f676d7b3da93de27d7ab70a5e302 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Wed, 21 Apr 2021 14:32:51 -0600 Subject: [PATCH] [applets/batterymonitor] Don't show percentage overlay with no batteries There's no point, since it always says "-" and just covers up the icon. Let's only show the overlay if there are actually any batteries. BUG: 435890 FIXED-IN: 5.22 --- .../package/contents/ui/CompactRepresentation.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml b/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml index e9f94f644..2f079ca7a 100644 --- a/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml +++ b/applets/batterymonitor/package/contents/ui/CompactRepresentation.qml @@ -86,9 +86,9 @@ MouseArea { anchors.bottom: parent.bottom anchors.right: parent.right - visible: plasmoid.configuration.showPercentage + visible: plasmoid.configuration.showPercentage && batteryContainer.hasBattery - text: batteryContainer.hasBattery ? i18nc("battery percentage below battery icon", "%1%", percent) : i18nc("short symbol to signal there is no battery currently available", "-") + text: i18nc("battery percentage below battery icon", "%1%", percent) icon: batteryIcon } }