aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-01-30 16:57:34 -0500
committerKen Moore <ken@ixsystems.com>2018-01-30 16:57:34 -0500
commitff713a8605f39d95ce2d3cfd2c17f892539d0f5a (patch)
tree5c975420277adc2d2a20d8407f47adf4ebbeb381 /src-qt5/core
parentMerge branch 'master' of https://github.com/trueos/lumina (diff)
downloadlumina-ff713a8605f39d95ce2d3cfd2c17f892539d0f5a.tar.gz
lumina-ff713a8605f39d95ce2d3cfd2c17f892539d0f5a.tar.bz2
lumina-ff713a8605f39d95ce2d3cfd2c17f892539d0f5a.zip
Get the Battery notification button put together.
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/StatusTray.qml3
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/BatteryButton.qml14
2 files changed, 12 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/StatusTray.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/StatusTray.qml
index 4552ea39..8f2239b9 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/StatusTray.qml
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/StatusTray.qml
@@ -15,7 +15,7 @@ import "./status_tray" as QML
Rectangle {
property int prefsize: (parent.width < parent.height) ? parent.width : parent.height
id: "status_tray"
- //color: "transparent"
+ color: "transparent"
Layout.fillHeight: true
Layout.fillWidth: true
@@ -38,7 +38,6 @@ Rectangle {
}
//Battery Status
QML.BatteryButton{
- id: "batButton"
Layout.preferredHeight: status_tray.prefsize
Layout.preferredWidth: status_tray.prefsize
}
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/BatteryButton.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/BatteryButton.qml
index 0963165d..8ceec2d4 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/BatteryButton.qml
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/BatteryButton.qml
@@ -5,8 +5,16 @@
// See the LICENSE file for full details
//===========================================
import QtQuick 2.2
-import QtQuick.Controls 2
+import QtQuick.Controls 1
-Rectangle{
- color: "red"
+import Lumina.Backend.RootDesktopObject 2.0
+import Lumina.Backend.OSInterface 2.0
+
+ToolButton{
+ property OSInterface os: RootObject.os_interface()
+ id: "batButton"
+ iconName: os.icon
+ tooltip: os.batteryCharge+"%: "+os.batteryRemaining
+ visible: os.batteryAvailable()
+ enabled: false
}
bgstack15