File tree 2 files changed +39
-2
lines changed
2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import QtQuick 2.15
6
6
import QtQuick.Controls 2.15
7
7
8
8
Button {
9
+ id: root
9
10
font .family : " Inter"
10
11
font .styleName : " Semi Bold"
11
12
font .pixelSize : 18
@@ -17,13 +18,49 @@ Button {
17
18
verticalAlignment: Text .AlignVCenter
18
19
}
19
20
background: Rectangle {
21
+ id: bg
20
22
implicitHeight: 46
21
23
implicitWidth: 340
22
24
color: Theme .color .background
23
25
radius: 5
26
+ state: " DEFAULT"
24
27
border {
25
28
width: 1
26
- color: Theme .color .neutral4
29
+ Behavior on color {
30
+ ColorAnimation { duration: 150 }
31
+ }
32
+ }
33
+
34
+ states: [
35
+ State {
36
+ name: " DEFAULT"
37
+ PropertyChanges { target: bg; border .color : Theme .color .neutral6 }
38
+ },
39
+ State {
40
+ name: " HOVER"
41
+ PropertyChanges { target: bg; border .color : Theme .color .neutral9 }
42
+ },
43
+ State {
44
+ name: " PRESSED"
45
+ PropertyChanges { target: bg; border .color : Theme .color .orangeLight2 }
46
+ }
47
+ ]
48
+ }
49
+ MouseArea {
50
+ anchors .fill : parent
51
+ hoverEnabled: true
52
+ onEntered: {
53
+ root .background .state = " HOVER"
54
+ }
55
+ onExited: {
56
+ root .background .state = " DEFAULT"
57
+ }
58
+ onPressed: {
59
+ root .background .state = " PRESSED"
60
+ }
61
+ onReleased: {
62
+ root .background .state = " DEFAULT"
63
+ root .clicked ()
27
64
}
28
65
}
29
66
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ ApplicationWindow {
23
23
Header {
24
24
Layout .topMargin : 30
25
25
Layout .fillWidth : true
26
- bold : true
26
+ headerBold : true
27
27
header: qsTr (" There was an issue starting up." )
28
28
headerSize: 21
29
29
description: message
You can’t perform that action at this time.
0 commit comments