blob: f475661d60f567851dbcdcdca9e8ec2a9d1958ce (
plain)
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
|
import QtQuick 2.0
import QtQuick.Templates 2.15
Button {
id: btn
implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
leftPadding: 28
topPadding: 20
rightPadding: 28
bottomPadding: 20
contentItem: Text {
text: btn.text
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
color: "green"
opacity: btn.down ? 0.8 : 1
radius: 4
}
}
|