File tree Expand file tree Collapse file tree 5 files changed +26
-60
lines changed Expand file tree Collapse file tree 5 files changed +26
-60
lines changed Original file line number Diff line number Diff line change @@ -67,19 +67,13 @@ Item {
67
67
}
68
68
}
69
69
70
- Button {
70
+ Icon {
71
71
id: bitcoinIcon
72
- background: null
73
- icon .source : " image://images/bitcoin-circle"
74
- icon .color : Theme .color .neutral9
75
- icon .width : Math .max (dial .width / 5 , 1 )
76
- icon .height : Math .max (dial .width / 5 , 1 )
72
+ source: " image://images/bitcoin-circle"
73
+ color: Theme .color .neutral9
74
+ size: Math .max (dial .width / 5 , 1 )
77
75
anchors .bottom : mainText .top
78
76
anchors .horizontalCenter : root .horizontalCenter
79
-
80
- Behavior on icon .color {
81
- ColorAnimation { duration: 150 }
82
- }
83
77
}
84
78
85
79
Label {
Original file line number Diff line number Diff line change 4
4
5
5
import QtQuick 2.15
6
6
import QtQuick.Controls 2.15
7
+ import "../controls"
7
8
8
- Button {
9
+ Icon {
9
10
id: root
10
11
required property color stateColor
11
-
12
- leftPadding: 0
13
- topPadding: 0
14
- bottomPadding: 0
15
- icon .source : " image://images/caret-right"
16
- icon .color : root .stateColor
17
- icon .height : 18
18
- icon .width : 18
19
- background: null
20
-
21
- Behavior on icon .color {
22
- ColorAnimation { duration: 150 }
23
- }
12
+ enabled: true
13
+ source: " image://images/caret-right"
14
+ color: root .stateColor
15
+ size: 18
24
16
}
Original file line number Diff line number Diff line change @@ -19,18 +19,12 @@ ColumnLayout {
19
19
Setting {
20
20
Layout .fillWidth : true
21
21
header: qsTr (" Light" )
22
- actionItem: Button {
22
+ actionItem: Icon {
23
23
anchors .centerIn : parent
24
24
visible: ! Theme .dark
25
- icon .source : " image://images/check"
26
- icon .color : Theme .color .neutral9
27
- icon .height : 24
28
- icon .width : 24
29
- background: null
30
-
31
- Behavior on icon .color {
32
- ColorAnimation { duration: 150 }
33
- }
25
+ source: " image://images/check"
26
+ color: Theme .color .neutral9
27
+ size: 24
34
28
}
35
29
onClicked: {
36
30
Theme .dark = false
@@ -40,18 +34,12 @@ ColumnLayout {
40
34
Setting {
41
35
Layout .fillWidth : true
42
36
header: qsTr (" Dark" )
43
- actionItem: Button {
37
+ actionItem: Icon {
44
38
anchors .centerIn : parent
45
39
visible: Theme .dark
46
- icon .source : " image://images/check"
47
- icon .color : Theme .color .neutral9
48
- icon .height : 24
49
- icon .width : 24
50
- background: null
51
-
52
- Behavior on icon .color {
53
- ColorAnimation { duration: 150 }
54
- }
40
+ source: " image://images/check"
41
+ color: Theme .color .neutral9
42
+ size: 24
55
43
}
56
44
onClicked: {
57
45
Theme .dark = true ;
Original file line number Diff line number Diff line change @@ -84,18 +84,12 @@ Button {
84
84
Item {
85
85
height: parent .height
86
86
width: 40
87
- Button {
87
+ Icon {
88
88
anchors .centerIn : parent
89
89
visible: button .checked
90
- icon .source : " image://images/check"
91
- icon .color : Theme .color .neutral9
92
- icon .height : 24
93
- icon .width : 24
94
- background: null
95
-
96
- Behavior on icon .color {
97
- ColorAnimation { duration: 150 }
98
- }
90
+ source: " image://images/check"
91
+ color: Theme .color .neutral9
92
+ size: 24
99
93
}
100
94
}
101
95
}
Original file line number Diff line number Diff line change @@ -14,14 +14,12 @@ Page {
14
14
anchors .centerIn : parent
15
15
width: parent .width
16
16
spacing: 10
17
- Button {
17
+ Icon {
18
18
Layout .alignment : Qt .AlignCenter
19
19
Layout .bottomMargin : 20
20
- background: null
21
- icon .source : " image://images/shutdown"
22
- icon .color : Theme .color .neutral9
23
- icon .width : 60
24
- icon .height : 60
20
+ source: " image://images/shutdown"
21
+ color: Theme .color .neutral9
22
+ size: 60
25
23
}
26
24
Header {
27
25
Layout .alignment : Qt .AlignCenter
You can’t perform that action at this time.
0 commit comments