diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml')
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml new file mode 100644 index 00000000..e5bac0b5 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml @@ -0,0 +1,36 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +import QtQuick 2.2 +import QtQuick.Window 2.2 +import QtQuick.Controls 2.0 + +import Lumina.Backend.RootDesktopObject 2.0 + +Menu { + id: contextMenu + closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + MenuItem { + text: "Lock Screen" + onTriggered: { + RootObject.lockscreen() + } + } + + MenuItem { + text: "Logout" + //iconName: "system-log-out" + indicator: Image{ + asynchronous: true + //autoTransform: true + //source: "image://theme/system-logout" + source: "file:///usr/local/share/icons/material-design-light/scalable/actions/system-log-out.svg" + } + onTriggered: { + RootObject.logout() + } + } + } |