diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-18 11:58:59 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-18 11:58:59 -0400 |
commit | 7a3e9e46423d999d47e19b26e910c849028599de (patch) | |
tree | 699d7df6a17e797ba1c87566c2b9bdd241a52722 /src-qt5/src-qml | |
parent | Updated how video thumbnails are loaded. Now cached to stop crash when (diff) | |
download | lumina-7a3e9e46423d999d47e19b26e910c849028599de.tar.gz lumina-7a3e9e46423d999d47e19b26e910c849028599de.tar.bz2 lumina-7a3e9e46423d999d47e19b26e910c849028599de.zip |
Another quick checkpoint for Lumina 2 files. Nothing too spectacular yet - still in the experimental stage for the QML usage.
Diffstat (limited to 'src-qt5/src-qml')
-rw-r--r-- | src-qt5/src-qml/RootDesktop.qml | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/src-qt5/src-qml/RootDesktop.qml b/src-qt5/src-qml/RootDesktop.qml index b9d62894..a2576f2e 100644 --- a/src-qt5/src-qml/RootDesktop.qml +++ b/src-qt5/src-qml/RootDesktop.qml @@ -15,8 +15,11 @@ // root->setResizeMode(QQuickView::SizeRootObjectToView); // root->engine()->rootContext()->setContextProperty("RootObject", rootobj); //=========================================== -import QtQuick 2.0 +import QtQuick 2.2 import QtQuick.Window 2.2 +import QtQuick.Controls 1.4 + +import "." import Lumina.Backend.RootDesktopObject 2.0 import Lumina.Backend.ScreenObject 2.0 @@ -28,22 +31,33 @@ Rectangle { //Setup the right-click context menu MouseArea { anchors.fill: rootCanvas - acceptedButton: Qt.RightButton - onClicked: { contextMenu.open() } + acceptedButtons: Qt.RightButton + onClicked: { + //contextMenu.x = mouseX + //contextMenu.y = mouseY + contextMenu.popup() + } + onPositionChanged: { + RootObject.mousePositionChanged() + } } //Create the context menu itself Menu { id: contextMenu - + //closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside MenuItem { - test: qtTr("Logout") - indicator: Image{ + text: "Logout" + iconName: "system-logout" + /*indicator: Image{ asynchronous: true - autoTransform: true + //autoTransform: true source: "image://theme/system-logout" + }*/ + onTriggered: { + RootObject.logout() + //contextMenu.close() } - onTriggered: RootObject.logout() } } @@ -51,14 +65,14 @@ Rectangle { Repeater{ model: RootObject.screens AnimatedImage { - id: ("screen_"+modelData.name) asynchronous: true clip: true source: modelData.background - x: modelData.screen.virtualX - y: modelData.screen.virtualY - width: modelData.screen.width - height: modelData.screen.height + x: modelData.x + y: modelData.y + z: 0+index + width: modelData.width + height: modelData.height } } } |