@@ -0,0 +1,89 @@
1+/*
2+* Copyright (C) 2017 Canonical, Ltd.
3+*
4+* This program is free software; you can redistribute it and/or modify
5+* it under the terms of the GNU General Public License as published by
6+* the Free Software Foundation; version 3.
7+*
8+* This program is distributed in the hope that it will be useful,
9+* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+* GNU General Public License for more details.
12+*
13+* You should have received a copy of the GNU General Public License
14+* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+*/
16+
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+
20+import "../../qml/ApplicationMenus"
21+import "../../qml/Panel"
22+import "../../qml/Components/PanelState"
23+
24+import QMenuModel 0.1
25+import Unity.Indicators 0.1 as Indicators
26+
27+Item {
28+ width: units.gu(180)
29+ height: units.gu(120)
30+
31+ UnityMenuModel {
32+ id: menuModel
33+ busName: contextBusName
34+ menuObjectPath: "/com/ubuntu/Menu/0"
35+ actions: { "unity": "/com/ubuntu/Menu/0" }
36+ }
37+
38+ Panel {
39+ id: panel
40+
41+ height: parent.height
42+ width: parent.width / 2
43+ minimizedPanelHeight: units.gu(6)
44+
45+ mode: "windowed"
46+
47+ applicationMenus {
48+ model: menuModel
49+ }
50+
51+ Rectangle {
52+ color: "green"
53+ anchors.bottom: parent.bottom
54+ anchors.right: parent.right
55+ Label {
56+ id: label
57+ anchors.centerIn: parent
58+ text: "Click here to open touch menu manually"
59+ }
60+ width: label.width + units.gu(2)
61+ height: label.height + units.gu(2)
62+ MouseArea {
63+ anchors.fill: parent
64+ onClicked: panel.applicationMenus.show();
65+ }
66+ visible: !panel.applicationMenus.shown
67+ }
68+ }
69+
70+ Rectangle {
71+ color: "blue"
72+ height: parent.height
73+ width: parent.width / 2
74+ x: width
75+
76+ MenuBar {
77+ id: menuBar
78+ height: units.gu(3)
79+ width: parent.width
80+ enableKeyFilter: true
81+ unityMenuModel: menuModel
82+ }
83+ }
84+
85+ Component.onCompleted: {
86+ theme.name = "Ubuntu.Components.Themes.SuruDark";
87+ PanelState.title = "Drag here to open touch menu";
88+ }
89+}