Changeset View
Changeset View
Standalone View
Standalone View
applets/kimpanel/package/contents/ui/MainContextMenu.qml
- This file was added.
1 | import QtQuick 2.0 | ||||
---|---|---|---|---|---|
2 | import org.kde.plasma.core 2.0 as PlasmaCore | ||||
3 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||||
4 | import org.kde.plasma.plasmoid 2.0 | ||||
5 | | ||||
6 | PlasmaComponents.ContextMenu { | ||||
7 | | ||||
8 | signal configureClicked(); | ||||
9 | | ||||
10 | placement: { | ||||
11 | if (plasmoid.location == PlasmaCore.Types.LeftEdge) { | ||||
12 | return PlasmaCore.Types.RightPosedTopAlignedPopup; | ||||
13 | } else if (plasmoid.location == PlasmaCore.Types.TopEdge) { | ||||
14 | return PlasmaCore.Types.BottomPosedLeftAlignedPopup; | ||||
15 | } else if (plasmoid.location == PlasmaCore.Types.RightEdge) { | ||||
16 | return PlasmaCore.Types.LeftPosedTopAlignedPopup; | ||||
17 | } else { | ||||
18 | return PlasmaCore.Types.TopPosedLeftAlignedPopup; | ||||
19 | } | ||||
20 | } | ||||
21 | | ||||
22 | PlasmaComponents.MenuItem { | ||||
23 | id: configureItem | ||||
24 | text: i18n("Configure Keyboard..."); | ||||
25 | icon: "configure" | ||||
26 | | ||||
27 | onClicked: { | ||||
28 | configureClicked(); | ||||
29 | } | ||||
30 | } | ||||
31 | | ||||
32 | } |