diff options
Diffstat (limited to 'src-qt5/src-qml/RootDesktop.qml')
-rw-r--r-- | src-qt5/src-qml/RootDesktop.qml | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src-qt5/src-qml/RootDesktop.qml b/src-qt5/src-qml/RootDesktop.qml index d4d7fed7..0003366b 100644 --- a/src-qt5/src-qml/RootDesktop.qml +++ b/src-qt5/src-qml/RootDesktop.qml @@ -13,15 +13,40 @@ // RootDesktopObject *rootobj = new RootDesktopObject(); // QQuickView *root = new QQuickView(); // root->setResizeMode(QQuickView::SizeRootObjectToView); -// root->engine()->rootContext->setContextProperty("RootObject", rootobj); +// root->engine()->rootContext()->setContextProperty("RootObject", rootobj); //=========================================== import QtQuick 2.0 import QtQuick.Window 2.2 +import Lumina.Backend.RootDesktopObject 2.0 +import Lumina.Backend.ScreenObject 2.0 + Rectangle { id: RootCanvas color: "black" + //Setup the right-click context menu + MouseArea { + anchors.fill: RootCanvas + acceptedButton: Qt.RightButton + onClicked: { contextMenu.open() } + } + + //Create the context menu itself + Menu { + id: contextMenu + + MenuItem { + test: qtTr("Logout") + indicator: Image{ + asynchronous: true + autoTransform: true + source: "image://theme/system-logout" + } + onTriggered: RootObject.logout() + } + } + //Setup the wallpapers Repeater{ model: RootObject.screens |