-
Notifications
You must be signed in to change notification settings - Fork 1
/
VeButton.qml
70 lines (50 loc) · 1.11 KB
/
VeButton.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import QtQuick 2.9
import QtQuick.Window 2.3
//import QtQuick.Controls 1.3
//import QtQuick.Controls.Styles 1.3
//import Ubuntu.Components 1.2
import "main.js" as Scripts
Item {
id:popup
property string number: "0"
property string list:""
property string title:""
property int enabled:1
clip: true
states: [
State {
name:"pressed"
PropertyChanges {
target: back
color:"gray"
}
},
State {
name:"normal"
PropertyChanges {
target: back
color:"white"
}
}
]
state:"normal"
Rectangle {
id:back
width:parent.width
height:parent.height
radius: 20
border.width:0
border.color:"black"
color:"white"
Text {
anchors.centerIn: parent
text:title
font.pixelSize: parent.height * 0.35
}
}
MouseArea {
anchors.fill:parent
onPressed:popup.state = "pressed"
onReleased: popup.state = "normal"
}
}