-
Notifications
You must be signed in to change notification settings - Fork 1
/
Menu.qml
44 lines (36 loc) · 962 Bytes
/
Menu.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import QtQuick 2.0
import "helpers.js" as Helpers
ListView {
model: MenuContent {}
delegate: Rectangle {
height: menu.height/6
width: menu.width
color: "black"
Image {
id: menuIcon
anchors.leftMargin: menu.width*0.1
anchors.verticalCenter: parent.verticalCenter
}
Text {
id: menuText
text: name
anchors.left: menuIcon.right
anchors.leftMargin: menu.width*0.1
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: menu.height/6*0.6
color: "white"
}
Rectangle {
width: parent.width
height: 1
color: "white"
anchors.bottom: parent.bottom
}
MouseArea {
anchors.fill: parent
onClicked: {
Helpers.startAction(action, type);
}
}
}
}