aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-02-02 15:07:12 -0500
committerKen Moore <ken@ixsystems.com>2018-02-02 15:07:12 -0500
commit42c516b6907c041d46838ac808c9587baf7d1d9b (patch)
tree85582f93ab29c6361f80d5c9134ece6a122bfcc2 /src-qt5/core/lumina-desktop-unified
parentAdd a new "Clock_Digital" plugin (diff)
downloadlumina-42c516b6907c041d46838ac808c9587baf7d1d9b.tar.gz
lumina-42c516b6907c041d46838ac808c9587baf7d1d9b.tar.bz2
lumina-42c516b6907c041d46838ac808c9587baf7d1d9b.zip
Add a new "Spacer" plugin, and tinker with a lot of the panel mechanics.
Trying to get things organized properly on the panels
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/Panel.qml26
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Clock_Digital.qml8
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Spacer.qml16
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/StatusTray.qml36
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/plugins.pri3
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/status_tray/UpdateButton.qml4
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc1
7 files changed, 62 insertions, 32 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/Panel.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/Panel.qml
index 48046648..2a8579a8 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/Panel.qml
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/Panel.qml
@@ -27,21 +27,29 @@ Rectangle {
GridLayout{
id: layout
anchors.fill: parent;
- columns: (object.width>object.height) ? -1 : 1
- rows: (object.width>object.height) ? 1 : -1
+ columns: parent.object.isVertical ? 1 : -1
+ rows: parent.object.isVertical ? -1 : 1
+
+ //hardcode some plugins for the moment
+ //PLUGINS.Spacer{}
- //hardcode the "status_tray" plugin at the moment
PLUGINS.StatusTray{
id: "statustray"
- Layout.fillHeight: layout.parent.object.isVertical ? false : true
- Layout.fillWidth: layout.parent.object.isVertical ? true : false
-
+ vertical: layout.parent.object.isVertical
+ //Layout.fillWidth: layout.parent.object.isVertical ? true : false
+ //Layout.fillHeight: layout.parent.object.isVertical ? false : true
}
+
+ //PLUGINS.Spacer{}
+
PLUGINS.Clock_Digital{
id: "clock"
- Layout.fillHeight: layout.parent.object.isVertical ? false : true
- Layout.fillWidth: layout.parent.object.isVertical ? true : false
+ vertical: layout.parent.object.isVertical
+ //Layout.fillWidth: layout.parent.object.isVertical ? true : false
+ //Layout.fillHeight: layout.parent.object.isVertical ? false : true
}
- }
+ //PLUGINS.Spacer{}
+
+ } //end of grid layout
}
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Clock_Digital.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Clock_Digital.qml
index aaa8ddd0..f82d398b 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Clock_Digital.qml
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Clock_Digital.qml
@@ -12,6 +12,10 @@ import QtQuick.Controls 1
import Lumina.Backend.RootDesktopObject 2.0
-ToolButton{
- text: RootObject.currentTime
+Label{
+ property bool vertical
+ text: RootObject.currentTime
+ wrapMode: Text.WrapWord
+ rotation: vertical ? 90 : 0
+ transformOrigin: Item.Center
}
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Spacer.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Spacer.qml
new file mode 100644
index 00000000..d46e486c
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/plugins/Spacer.qml
@@ -0,0 +1,16 @@
+//===========================================
+// Lumina-desktop source code
+// Copyright (c) 2018, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This is the QML plugin that displays the OS status/system tray
+//===========================================
+import QtQuick 2.2
+import QtQuick.Layouts 1.3
+
+
+Item{
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+}
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 0bec74f2..a2d49b35 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
@@ -8,7 +8,7 @@
//===========================================
import QtQuick 2.2
import QtQuick.Layouts 1.3
-import QtQuick.Controls 2
+import QtQuick.Controls 1
import Lumina.Backend.RootDesktopObject 2.0
import Lumina.Backend.NativeWindowObject 2.0
@@ -16,38 +16,38 @@ import Lumina.Backend.NativeWindowObject 2.0
import "./status_tray" as QML
-Rectangle {
- property int prefsize: (parent.width < parent.height) ? parent.width : parent.height
+Item {
+ property bool vertical
+ property int prefsize: vertical ? parent.width : parent.height
id: "status_tray"
- color: "transparent"
- Layout.fillHeight: true
- Layout.fillWidth: true
GridLayout{
anchors.fill: parent
- flow: GridLayout.LeftToRight
- columnSpacing: 2
- rowSpacing: 2
+ flow: parent.vertical ? GridLayout.TopToBottom : GridLayout.LeftToRight
+ columns: vertical ? 2 : -1
+ rows: vertical ? -1 : 2
+ //columnSpacing: 2
+ //rowSpacing: 2
//Volume Status
QML.VolumeButton{
- Layout.preferredHeight: status_tray.prefsize
- Layout.preferredWidth: status_tray.prefsize
+ //Layout.preferredHeight: status_tray.prefsize
+ //Layout.preferredWidth: status_tray.prefsize
}
//Network Status
QML.NetworkButton{
- Layout.preferredHeight: status_tray.prefsize
- Layout.preferredWidth: status_tray.prefsize
+ //Layout.preferredHeight: status_tray.prefsize
+ //Layout.preferredWidth: status_tray.prefsize
}
//Battery Status
QML.BatteryButton{
- Layout.preferredHeight: status_tray.prefsize
- Layout.preferredWidth: status_tray.prefsize
+ //Layout.preferredHeight: status_tray.prefsize
+ //Layout.preferredWidth: status_tray.prefsize
}
//Update Status
QML.UpdateButton{
- Layout.preferredHeight: status_tray.prefsize
- Layout.preferredWidth: status_tray.prefsize
+ //Layout.preferredHeight: status_tray.prefsize
+ //Layout.preferredWidth: status_tray.prefsize
}
//System Tray Menu Button
ToolButton{
@@ -56,7 +56,7 @@ Rectangle {
//iconName: "view-more-vertical"
visible: RootObject.hasTrayWindows
onClicked: trayMenu.open()
- Menu{
+ menu: Menu{
id: "trayMenu"
//MenuItem{ text: "sample" }
//MenuItem{ text: "sample2" }
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 a6296e13..d1939616 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
@@ -6,5 +6,6 @@ lupdate_only{
$${PWD}/status_tray/NetworkButton.qml \
$${PWD}/status_tray/BatteryButton.qml \
$${PWD}/status_tray/UpdateButton.qml \
- $${PWD}/Clock_Digital.qml
+ $${PWD}/Clock_Digital.qml \
+ $${PWD}/Spacer.qml
}
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
index 881f164f..9ba824ae 100644
--- 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
@@ -14,8 +14,8 @@ ToolButton{
id: "updateButton"
property OSInterface os: RootObject.os_interface()
iconName: os.updateIcon
- tooltip: os.networkStatus
- visible: (os.updateStatus == "")
+ tooltip: os.updateStatus
+ visible: os.updateInfoAvailable
/*enabled: os.hasUpdateManager()
onClicked: {
RootObject.launchApplication(os.updateManagerUtility())
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 292caea2..0513e467 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
@@ -12,5 +12,6 @@
<file>plugins/status_tray/BatteryButton.qml</file>
<file>plugins/status_tray/UpdateButton.qml</file>
<file>plugins/Clock_Digital.qml</file>
+ <file>plugins/Spacer.qml</file>
</qresource>
</RCC>
bgstack15