File tree Expand file tree Collapse file tree 5 files changed +38
-2
lines changed Expand file tree Collapse file tree 5 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 36
36
37
37
selected: selectionCheckBox .checked
38
38
forceHovered: forceHoveredCheckBox .checked
39
+ size: smallCheckBox .checked ? TokenSelectorButton .Size .Small :
40
+ TokenSelectorButton .Size .Normal
41
+
39
42
40
43
name: " My token" + (longNameCheckBox .checked ? " long name" : " " )
41
44
icon: Constants .tokenIcon (" CFI" )
@@ -61,6 +64,13 @@ Pane {
61
64
62
65
text: " force hovered"
63
66
}
67
+
68
+
69
+ CheckBox {
70
+ id: smallCheckBox
71
+
72
+ text: " small"
73
+ }
64
74
}
65
75
66
76
Settings {
Original file line number Diff line number Diff line change @@ -190,6 +190,9 @@ Pane {
190
190
191
191
anchors .centerIn : parent
192
192
193
+ size: smallCheckbox .checked ? TokenSelectorButton .Size .Small :
194
+ TokenSelectorButton .Size .Normal
195
+
193
196
assetsModel: assetsModelCheckBox .checked ? assetsModel : null
194
197
collectiblesModel: collectiblesModelCheckBox .checked ? collectiblesModel : null
195
198
@@ -215,6 +218,12 @@ Pane {
215
218
checked: true
216
219
text: " Collectibles model assigned"
217
220
}
221
+
222
+ CheckBox {
223
+ id: smallCheckbox
224
+
225
+ text: " small"
226
+ }
218
227
}
219
228
}
220
229
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ Control {
17
17
/** Expected model structure: see SearchableCollectiblesPanel::model **/
18
18
property alias collectiblesModel: tokenSelectorPanel .collectiblesModel
19
19
20
+ /** Sets size of the TokenSelectorButton **/
21
+ property alias size: tokenSelectorButton .size
22
+
20
23
readonly property bool isTokenSelected: tokenSelectorButton .selected
21
24
22
25
signal assetSelected (string key)
Original file line number Diff line number Diff line change @@ -20,9 +20,17 @@ Control {
20
20
property string name
21
21
property url icon
22
22
23
+ /** Sets size of the Token Selector Button **/
24
+ property int size: TokenSelectorButton .Size .Normal
25
+
23
26
signal clicked
24
27
25
- padding: 10
28
+ enum Size {
29
+ Small,
30
+ Normal
31
+ }
32
+
33
+ padding: root .selected ? 0 : 10
26
34
27
35
background: StatusComboboxBackground {
28
36
border .width : 0
@@ -83,7 +91,9 @@ Control {
83
91
Layout .fillWidth : true
84
92
85
93
objectName: " tokenSelectorContentItemText"
86
- font .pixelSize : 28
94
+ font .pixelSize : root .size === TokenSelectorButton .Size .Normal ? 28 : 22
95
+ lineHeightMode: Text .FixedHeight
96
+ lineHeight: root .size === TokenSelectorButton .Size .Normal ? 38 : 30
87
97
color: root .hovered ? Theme .palette .blue : Theme .palette .darkBlue
88
98
89
99
elide: Text .ElideRight
Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ RowLayout {
82
82
83
83
Layout .preferredWidth : implicitWidth
84
84
85
+ size: root .isStickyHeader ?
86
+ TokenSelectorButton .Size .Small :
87
+ TokenSelectorButton .Size .Normal
88
+
85
89
assetsModel: root .assetsModel
86
90
collectiblesModel: root .collectiblesModel
87
91
You can’t perform that action at this time.
0 commit comments