Skip to content

Commit a9e210a

Browse files
committed
qml: Added descriptionColor and descriptionBold properties in Header.qml
- This property will later be used for the BlockClock.qml file
1 parent a7e5b30 commit a9e210a

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/qml/controls/Header.qml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ import QtQuick.Layouts 1.15
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/controls/InformationPage.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Page {
5555
Layout.fillWidth: true
5656
Layout.leftMargin: 20
5757
Layout.rightMargin: 20
58-
bold: root.bold
58+
headerBold: root.bold
5959
center: root.center
6060
header: root.headerText
6161
headerMargin: root.headerMargin

src/qml/pages/main.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ApplicationWindow {
5959
}
6060
NodeSettings {
6161
navMiddleDetail: Header {
62-
bold: true
62+
headerBold: true
6363
headerSize: 18
6464
header: "Settings"
6565
}

0 commit comments

Comments
 (0)