[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
wilder-5.22
Nate Graham 5 years ago
parent 4c03101ac9
commit b88713cbbf
  1. 4
      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
}
}

Loading…
Cancel
Save