-
Notifications
You must be signed in to change notification settings - Fork 17
/
CButton.qml
32 lines (28 loc) · 795 Bytes
/
CButton.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
import QtQuick 2.6
import QtQuick.Controls 2.0
Button {
id: control
text: qsTr("Log In")
font.pointSize: 16
property alias name: control.text
property color baseColor
property color borderColor
contentItem: Text {
text: control.text
font: control.font
opacity: enabled ? 1.0 : 0.3
color: control.down ? "#ffffff" : "#ffffff"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
background: Rectangle {
id: bgrect
implicitWidth: 100
implicitHeight: 50
color: baseColor //"#6fda9c"
opacity: control.down ? 0.7 : 1
radius: height/2
border.color: borderColor
}
}