Skip to content

Commit 2cf0004

Browse files
johnny9shaavan
authored andcommitted
qml: add additional properties in Header
Additional properties to Header will allow configuring Header's description color and bold values as well as Header's header-text bold value. Github-Pull: #220 Rebased-From: 8db7f0f Co-authored-by: shaavan <shaavan.github@gmail.com>
1 parent 3060217 commit 2cf0004

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/qml/BitcoinApp/Controls/Header.qml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ import QtQuick.Layouts
88

99
ColumnLayout {
1010
id: root
11-
property bool bold: false
1211
property bool center: true
1312
required property string header
1413
property int headerMargin
1514
property int headerSize: 28
15+
property bool headerBold: false
1616
property string description: ""
1717
property int descriptionMargin: 10
1818
property int descriptionSize: 18
19+
property string descriptionColor: Theme.color.neutral8
20+
property bool descriptionBold: false
1921
property string subtext: ""
2022
property int subtextMargin
2123
property int subtextSize: 15
@@ -26,7 +28,7 @@ ColumnLayout {
2628
Layout.fillWidth: true
2729
topPadding: root.headerMargin
2830
font.family: "Inter"
29-
font.styleName: root.bold ? "Semi Bold" : "Regular"
31+
font.styleName: root.headerBold ? "Semi Bold" : "Regular"
3032
font.pixelSize: root.headerSize
3133
color: Theme.color.neutral9
3234
text: root.header
@@ -40,9 +42,9 @@ ColumnLayout {
4042
sourceComponent: Label {
4143
topPadding: root.descriptionMargin
4244
font.family: "Inter"
43-
font.styleName: "Regular"
45+
font.styleName: root.descriptionBold ? "Semi Bold" : "Regular"
4446
font.pixelSize: root.descriptionSize
45-
color: Theme.color.neutral8
47+
color: root.descriptionColor
4648
text: root.description
4749
horizontalAlignment: root.center ? Text.AlignHCenter : Text.AlignLeft
4850
wrapMode: wrap ? Text.WordWrap : Text.NoWrap

src/qml/BitcoinApp/Controls/InformationPage.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Page {
6565
Layout.fillWidth: true
6666
Layout.leftMargin: 20
6767
Layout.rightMargin: 20
68-
bold: root.bold
68+
headerBold: root.bold
6969
center: root.center
7070
header: root.headerText
7171
headerMargin: root.headerMargin

src/qml/BitcoinApp/main.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ApplicationWindow {
5555
}
5656
NodeSettings {
5757
navMiddleDetail: Header {
58-
bold: true
58+
headerBold: true
5959
headerSize: 18
6060
header: "Settings"
6161
}

0 commit comments

Comments
 (0)