-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButton.qml
More file actions
56 lines (49 loc) · 1.07 KB
/
Copy pathButton.qml
File metadata and controls
56 lines (49 loc) · 1.07 KB
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
import QtQuick 2.12
Rectangle
{
id: container
property string text: "Button"
property color buttonColor1: "#87CEFF"
property color buttonColor2: "#B0E2FF"
property color textColor: "#666666"
signal clicked
width: 100
height: 30
antialiasing: true
radius: height / 2
gradient:
Gradient
{
GradientStop
{
position: 0.0
color:
{
if (mouseArea.pressed)
return buttonColor2
else
return buttonColor1
}
}
GradientStop
{
position: 1.0
color: buttonColor2
}
}
MouseArea
{
id: mouseArea
anchors.fill: parent
onClicked: container.clicked();
}
Text
{
id: buttonLabel
anchors.centerIn: container
color: textColor
font.family: "Century"
font.pixelSize: 15
text: container.text
}
}