-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathOldButton.qml
54 lines (49 loc) · 1.23 KB
/
OldButton.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
import QtQuick 2.0
// root-Rectangle
Rectangle {
// ID
id: button
// Signals
signal btnSignal_onClick
// Properties Aliases
property alias text: text.text
// Border
border.width: 1
border.color: "white"
// Properties
property real textHeight: height - 2
property real fontHeight: 0.3
property bool pressed: mouse.pressed
property real implicitMargin: (width - text.implicitWidth) / 2
// Text (Label)
Text {
// ID
id: textLabel
// Text-Content
text: qsTr("text")
// Anchors
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
// Height
height: parent.textHeight
// Text-Alignment
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
// Font-Size
font.pixelSize: height * fontHeight
// Text-Color
color: "#1b1c1d"
// Font-Style
font.family: "Open Sans Regular"
} // Text
// Pointer-Input
MouseArea {
// ID
id: mouse
// Anchors
anchors.fill: parent
// Signal
onClicked: button.btnSignal_onClick( )
} // MouseArea
} // root-Rectangle