@@ -15,7 +15,10 @@ AbstractButton {
15
15
property Rectangle iconBackground: null
16
16
property color iconColor: Theme .color .neutral9
17
17
18
- padding: 0
18
+ topPadding: text_background .active ? 7 : 14
19
+ bottomPadding: text_background .active ? 7 : 14
20
+ rightPadding: text_background .active ? 22 : 14
21
+ leftPadding: text_background .active ? 2 : 14
19
22
background: Rectangle {
20
23
id: bg
21
24
height: root .height
@@ -43,7 +46,6 @@ AbstractButton {
43
46
}
44
47
}
45
48
contentItem: RowLayout {
46
- anchors .fill : parent
47
49
spacing: 0
48
50
Loader {
49
51
id: button_background
@@ -63,22 +65,25 @@ AbstractButton {
63
65
}
64
66
}
65
67
Loader {
66
- active: root .text .length > 0
67
- visible: active
68
- sourceComponent: AbstractButton {
69
- id: container
70
- padding: 0
71
- font .family : " Inter"
72
- font .styleName : " Semi Bold"
73
- font .pixelSize : root .textSize
74
- background: null
75
- contentItem: Text {
76
- anchors .verticalCenter : parent .verticalCenter
77
- font: container .font
78
- color: Theme .color .neutral9
79
- text: root .text
80
- }
81
- }
68
+ id: text_background
69
+ active: root .text .length > 0
70
+ visible: active
71
+ sourceComponent: AbstractButton {
72
+ id: container
73
+ topPadding: button_background .active ? 0 : 4
74
+ bottomPadding: button_background .active ? 0 : 4
75
+ rightPadding: 0
76
+ leftPadding: button_background .active ? 0 : 20
77
+ font .family : " Inter"
78
+ font .styleName : " Semi Bold"
79
+ font .pixelSize : root .textSize
80
+ contentItem: Text {
81
+ anchors .verticalCenter : parent .verticalCenter
82
+ font: container .font
83
+ color: Theme .color .neutral9
84
+ text: root .text
85
+ }
86
+ }
82
87
}
83
88
}
84
89
MouseArea {
0 commit comments