File tree Expand file tree Collapse file tree 9 files changed +36
-34
lines changed Expand file tree Collapse file tree 9 files changed +36
-34
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,7 @@ QML_RES_QML = \
345
345
qml/components/StorageOptions.qml \
346
346
qml/components/StorageSettings.qml \
347
347
qml/controls/ContinueButton.qml \
348
+ qml/controls/CoreText.qml \
348
349
qml/controls/ExternalLink.qml \
349
350
qml/controls/Header.qml \
350
351
qml/controls/InformationPage.qml \
Original file line number Diff line number Diff line change 15
15
<file>components/StorageOptions.qml</file>
16
16
<file>components/StorageSettings.qml</file>
17
17
<file>controls/ContinueButton.qml</file>
18
+ <file>controls/CoreText.qml</file>
18
19
<file>controls/ExternalLink.qml</file>
19
20
<file>controls/Header.qml</file>
20
21
<file>controls/InformationPage.qml</file>
Original file line number Diff line number Diff line change @@ -13,17 +13,14 @@ Button {
13
13
id: root
14
14
property color bgColor
15
15
property int textSize: 15
16
- font .family : " Inter"
17
- font .styleName : " Regular"
18
- font .pixelSize : root .textSize
19
16
topPadding: 2
20
17
bottomPadding: 2
21
18
leftPadding: 7
22
19
rightPadding: 7
23
20
state: chainModel .currentNetworkName
24
- contentItem: Text {
21
+ contentItem: CoreText {
25
22
text: root .text
26
- font: root .font
23
+ font . pixelSize : root .textSize
27
24
color: Theme .color .white
28
25
horizontalAlignment: Text .AlignHCenter
29
26
verticalAlignment: Text .AlignVCenter
Original file line number Diff line number Diff line change @@ -7,16 +7,11 @@ import QtQuick.Controls 2.15
7
7
8
8
Button {
9
9
id: root
10
- font .family : " Inter"
11
- font .styleName : " Semi Bold"
12
- font .pixelSize : 18
13
10
hoverEnabled: true
14
- contentItem: Text {
11
+ contentItem: CoreText {
15
12
text: parent .text
16
- font: parent .font
17
- color: Theme .color .white
18
- horizontalAlignment: Text .AlignHCenter
19
- verticalAlignment: Text .AlignVCenter
13
+ bold: true
14
+ font .pixelSize : 18
20
15
}
21
16
background: Rectangle {
22
17
id: bg
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2023 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ import QtQuick 2.15
6
+ import QtQuick.Controls 2.15
7
+
8
+ Text {
9
+ property bool bold: false
10
+ property bool wrap: true
11
+ color: Theme .color .white
12
+ font .family : " Inter"
13
+ font .styleName : bold ? " Semi Bold" : " Regular"
14
+ font .pixelSize : 13
15
+ horizontalAlignment: Text .AlignHCenter
16
+ verticalAlignment: Text .AlignVCenter
17
+ wrapMode: wrap ? Text .WordWrap : Text .NoWrap
18
+ }
Original file line number Diff line number Diff line change @@ -45,13 +45,12 @@ AbstractButton {
45
45
Layout .fillWidth : true
46
46
active: root .description .length > 0
47
47
visible: active
48
- sourceComponent: Text {
49
- font .family : " Inter"
50
- font .styleName : " Regular"
48
+ sourceComponent: CoreText {
51
49
font .pixelSize : root .descriptionSize
52
50
color: root .textColor
53
51
textFormat: Text .RichText
54
52
text: root .description
53
+ wrap: false
55
54
56
55
Behavior on color {
57
56
ColorAnimation { duration: 150 }
Original file line number Diff line number Diff line change @@ -74,12 +74,10 @@ AbstractButton {
74
74
bottomPadding: button_background .active ? 0 : 4
75
75
rightPadding: 0
76
76
leftPadding: button_background .active ? 0 : 20
77
- font .family : " Inter"
78
- font .styleName : " Semi Bold"
79
- font .pixelSize : root .textSize
80
- contentItem: Text {
77
+ contentItem: CoreText {
81
78
anchors .verticalCenter : parent .verticalCenter
82
- font: container .font
79
+ bold: true
80
+ font .pixelSize : root .textSize
83
81
color: Theme .color .neutral9
84
82
text: root .text
85
83
}
Original file line number Diff line number Diff line change @@ -7,16 +7,12 @@ import QtQuick.Controls 2.15
7
7
8
8
Button {
9
9
id: root
10
- font .family : " Inter"
11
- font .styleName : " Semi Bold"
12
- font .pixelSize : 18
13
10
hoverEnabled: true
14
- contentItem: Text {
11
+ contentItem: CoreText {
15
12
text: parent .text
16
- font: parent .font
13
+ bold: true
14
+ font .pixelSize : 18
17
15
color: Theme .color .neutral9
18
- horizontalAlignment: Text .AlignHCenter
19
- verticalAlignment: Text .AlignVCenter
20
16
}
21
17
background: Rectangle {
22
18
id: bg
Original file line number Diff line number Diff line change @@ -12,17 +12,14 @@ Button {
12
12
property color bgColor: Theme .color .background
13
13
property bool bold: true
14
14
property bool rightalign: false
15
- font .family : " Inter"
16
- font .styleName : bold ? " Semi Bold" : " Regular"
17
- font .pixelSize : root .textSize
18
15
padding: 15
19
16
hoverEnabled: true
20
- contentItem: Text {
17
+ contentItem: CoreText {
21
18
text: root .text
22
- font: root .font
19
+ bold: root .bold
20
+ font .pixelSize : root .textSize
23
21
color: root .textColor
24
22
horizontalAlignment: rightalign ? Text .AlignRight : Text .AlignHCenter
25
- verticalAlignment: Text .AlignVCenter
26
23
Behavior on color {
27
24
ColorAnimation { duration: 150 }
28
25
}
You can’t perform that action at this time.
0 commit comments