@@ -58,11 +58,8 @@ Page {
58
58
height: units .gu (28 )
59
59
anchors .bottom : parent .bottom
60
60
anchors .horizontalCenter : parent .horizontalCenter
61
- color: showPad ? " #4E2865 " : " transparent"
61
+ color: showPad ? " white " : " transparent"
62
62
opacity: showPad ? 1.0 : 0.5
63
- // [startx, starty, endx, endy, key]
64
- // position in absolute value
65
- // keyname, x,y,width, height left or right, key, image
66
63
property var buttonsPositions: [
67
64
[" L" , 2.25 , 21.25 , 11 , 5 , " left" , Qt .Key_A , " ./img/LButton.png" ],
68
65
[" R" , 2.25 , 21.25 , 11 , 5 , " right" , Qt .Key_S , " ./img/RButton.png" ],
74
71
]
75
72
property var directRatio: 0.31 ;
76
73
property var lastKeyStatus: [false , false , false , false , false , false , false , false , false , false ]
77
- property var buttonKeys: [Qt .Key_A , Qt .Key_S , Qt .Key_Z , Qt .Key_X , Qt .Key_Return , Qt .Key_Backspace , Qt .Key_Up , Qt .Key_Left , Qt .Key_Down , Qt .Key_Right ]
74
+ property var buttonKeys: [Qt .Key_A , Qt .Key_S , Qt .Key_Z , Qt .Key_X , Qt .Key_Return , Qt .Key_Backspace , Qt .Key_Up , Qt .Key_Left , Qt .Key_Down , Qt .Key_Right ]
78
75
79
76
MultiPointTouchArea {
80
77
anchors .fill : parent
@@ -173,97 +170,57 @@ Page {
173
170
}
174
171
}
175
172
176
- MouseArea {
177
- id: toolbarMask
178
- anchors {
179
- top: parent .top
180
- left: parent .left
181
- right: parent .right
182
- bottom: tools .top
183
- }
184
- enabled: tools .opened
185
- onClicked: tools .close ()
186
- }
187
-
188
- Icon {
189
- name: " contextual-menu"
190
- opacity: 0.5
191
- width: units .gu (5 )
192
- height: width
193
- x: units .gu (2 )
194
- y: units .gu (2 )
195
- MouseArea {
196
- anchors .fill : parent
197
- onClicked: tools .open ()
198
- }
199
- }
173
+ // MouseArea {
174
+ // id: toolbarMask
175
+ // anchors {
176
+ // top: tools.bottom
177
+ // left: parent.left
178
+ // right: parent.right
179
+ // bottom: parent.bottom
180
+ // }
181
+ // enabled: tools.opened
182
+ // onClicked: tools.close()
183
+ // }
200
184
201
- Panel {
185
+ header : PageHeader {
202
186
id: tools
203
- anchors {
204
- left: parent .left
205
- right: parent .right
206
- bottom: parent .bottom
207
- }
208
- height: units .gu (8 )
209
- Component .onCompleted : {
210
- tools .open ();
211
- closeToolbarTimer .start ();
212
- }
213
- Rectangle {
214
- anchors .fill : parent
215
- color: " white"
216
- }
217
-
218
- Timer {
219
- id: closeToolbarTimer
220
- interval: 2000
221
- repeat: false
222
- onTriggered: tools .close ()
223
- }
224
-
225
- ToolbarItems {
226
- back: ToolbarButton {
227
- action: Action {
228
- text: " Close"
229
- iconName: " close"
230
- onTriggered: {
231
- pageStack .pop ();
232
- iwindow .vOnFileClose ();
233
- }
234
- }
235
- }
236
- ToolbarButton {
237
- action: Action {
238
- text: " Settings"
239
- iconName: " settings"
240
- onTriggered: {
241
- pageStack .push (Qt .resolvedUrl (" SettingPage.qml" ));
242
- }
187
+
188
+ leadingActionBar .actions : [
189
+ Action {
190
+ text: " Quit"
191
+ iconName: " close"
192
+ onTriggered: {
193
+ iwindow .vOnFileClose ();
194
+ pageStack .pop ();
243
195
}
244
196
}
197
+ ]
245
198
246
- ToolbarButton {
247
- action: Action {
248
- text: " Save Slot"
249
- iconName: " save"
250
- onTriggered: {
251
- slotAction = " save" ;
252
- PopupUtils .open (slotSheet)
253
- }
199
+ trailingActionBar .actions : [
200
+ Action {
201
+ text: " Save Slot"
202
+ iconName: " save"
203
+ onTriggered: {
204
+ slotAction = " save" ;
205
+ PopupUtils .open (slotSheet)
254
206
}
255
- }
256
- ToolbarButton {
257
- action: Action {
258
- text: " Load Slot"
259
- iconName: " keyboard-caps-disabled"
260
- onTriggered: {
261
- slotAction = " load" ;
262
- PopupUtils .open (slotSheet)
263
- }
207
+ },
208
+ Action {
209
+ text: " Load Slot"
210
+ iconName: " keyboard-caps-disabled"
211
+ onTriggered: {
212
+ slotAction = " load" ;
213
+ PopupUtils .open (slotSheet)
214
+ }
215
+ },
216
+ Action {
217
+ text: " Settings"
218
+ iconName: " settings"
219
+ onTriggered: {
220
+ pageStack .push (Qt .resolvedUrl (" SettingPage.qml" ));
264
221
}
265
222
}
266
- }
223
+ ]
267
224
}
268
225
Component {
269
226
id: slotSheet
0 commit comments