[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-workspace] lookandfeel/contents/components: Don't show the battery item if there's no batter
From:       Aleix Pol <aleixpol () kde ! org>
Date:       2014-06-20 14:37:22
Message-ID: E1WxzwQ-0006N0-1i () scm ! kde ! org
[Download RAW message or body]

Git commit f5d7ff8df8fdd9c13d68fc5b79e29bfae9f00fdb by Aleix Pol.
Committed on 20/06/2014 at 14:32.
Pushed by apol into branch 'master'.

Don't show the battery item if there's no battery

CCBUG: 335862

M  +3    -2    lookandfeel/contents/components/InfoPane.qml

http://commits.kde.org/plasma-workspace/f5d7ff8df8fdd9c13d68fc5b79e29bfae9f00fdb

diff --git a/lookandfeel/contents/components/InfoPane.qml b/lookandfeel/contents/components/InfoPane.qml
index b97bb20..17d70f9 100644
--- a/lookandfeel/contents/components/InfoPane.qml
+++ b/lookandfeel/contents/components/InfoPane.qml
@@ -44,9 +44,10 @@ ColumnLayout {
 
     RowLayout {
         Layout.alignment: Qt.AlignRight
-        visible: pmSource.connectedSources != ""
-       
+        visible: pmSource.connectedSources != "" && pmSource.data["Battery"]["Has Battery"]
+
         PW.BatteryIcon {
+            id: battery
             hasBattery: true
             percent: pmSource.data["Battery0"]["Percent"]
             pluggedIn: pmSource.data["AC Adapter"]["Plugged in"]
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic