diff options
author | Ken Moore <ken@ixsystems.com> | 2018-01-31 12:04:36 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-01-31 12:04:36 -0500 |
commit | 4a2a6f3af5dab7effdb7c512e8b03adf2724b401 (patch) | |
tree | d0a4777680df4dc8573722643ed28c5de6f000d0 /src-qt5/core | |
parent | Get the volume button/backend functional. (diff) | |
download | lumina-4a2a6f3af5dab7effdb7c512e8b03adf2724b401.tar.gz lumina-4a2a6f3af5dab7effdb7c512e8b03adf2724b401.tar.bz2 lumina-4a2a6f3af5dab7effdb7c512e8b03adf2724b401.zip |
Get a lot more cache system setup for OSInterface backend.
Add a new "UpdateButton" to the StatusTray plugin.
Diffstat (limited to 'src-qt5/core')
5 files changed, 46 insertions, 4 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 254ffff2..e1e7cd10 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 @@ -40,6 +40,11 @@ Rectangle { Layout.preferredHeight: status_tray.prefsize Layout.preferredWidth: status_tray.prefsize } + //Update Status + QML.UpdateButton{ + Layout.preferredHeight: status_tray.prefsize + Layout.preferredWidth: status_tray.prefsize + } //System Tray Menu Popup } //end of layout diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/plugins.pri b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/plugins.pri index 36cc581b..50eb9c5c 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/plugins.pri +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/plugins.pri @@ -4,6 +4,7 @@ lupdate_only{ $${PWD}/status_tray/TrayIcon.qml \ $${PWD}/status_tray/VolumeButton.qml \ $${PWD}/status_tray/NetworkButton.qml \ - $${PWD}/status_tray/BatteryButton.qml + $${PWD}/status_tray/BatteryButton.qml \ + $${PWD}/status_tray/UpdateButton.qml } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/TrayIcon.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/TrayIcon.qml index 8b8367b0..26c50907 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/TrayIcon.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/TrayIcon.qml @@ -5,10 +5,21 @@ // See the LICENSE file for full details //=========================================== import QtQuick 2.2 -import QtQuick.Controls 2 +import QtQuick.Controls 1 import Lumina.Backend.NativeWindowObject 2.0 -Rectangle{ - color: "white" +Image{ + property NativeWindowObject winObj + source: winObj.icon + + MouseArea{ + anchors.fill: parent + acceptedButtons: Qt.NoButton + onEntered: { + //Need to ensure the invisible native window is over this place right now + point pt: parent.mapToGlobal(0,0) + winObj.updateGeometry( pt.x(), pt.y(), parent.width(), parent.height(), true); + } + } } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/UpdateButton.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/UpdateButton.qml new file mode 100644 index 00000000..881f164f --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/UpdateButton.qml @@ -0,0 +1,24 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2018, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +import QtQuick 2.2 +import QtQuick.Controls 1 + +import Lumina.Backend.RootDesktopObject 2.0 +import Lumina.Backend.OSInterface 2.0 + +ToolButton{ + id: "updateButton" + property OSInterface os: RootObject.os_interface() + iconName: os.updateIcon + tooltip: os.networkStatus + visible: (os.updateStatus == "") + /*enabled: os.hasUpdateManager() + onClicked: { + RootObject.launchApplication(os.updateManagerUtility()) + }*/ + //TODO - add a menu with update manager and start/view updates options +} diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc index ba143027..1da9d5bd 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc @@ -10,5 +10,6 @@ <file>plugins/status_tray/VolumeButton.qml</file> <file>plugins/status_tray/NetworkButton.qml</file> <file>plugins/status_tray/BatteryButton.qml</file> + <file>plugins/status_tray/UpdateButton.qml</file> </qresource> </RCC> |