@@ -5,7 +5,8 @@ AbstractButton {
5 property var cardData;
5 property var cardData;
6 property var artShapeBorderSource: undefined;
6 property var artShapeBorderSource: undefined;
7 property real fontScale: 1.0;
7 property real fontScale: 1.0;
8+ property color foregroundColor: "grey";
8− property int headerAlignment: Text.AlignLeft;
9+ property int headerAlignment: Text.AlignLeft;
9 property int fixedHeaderHeight: -1;
10 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
12 readonly property string title: cardData && cardData["title"] || "";
@@ -78,8 +79,7 @@ Column {
78 anchors.verticalCenter: parent.verticalCenter;
79 anchors.verticalCenter: parent.verticalCenter;
79 spacing: units.dp(2);
80 spacing: units.dp(2);
80 width: parent.width - x;
81 width: parent.width - x;
82−Label {
82+ data: [ Label {
83 id: titleLabel;
83 id: titleLabel;
84 objectName: "titleLabel";
84 objectName: "titleLabel";
85 anchors { left: parent.left; right: parent.right }
85 anchors { left: parent.left; right: parent.right }
@@ -88,7 +88,7 @@ Label {
88 wrapMode: Text.Wrap;
88 wrapMode: Text.Wrap;
89 maximumLineCount: 2;
89 maximumLineCount: 2;
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey";
91+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : root.foregroundColor;
92 visible: showHeader ;
92 visible: showHeader ;
93 text: root.title;
93 text: root.title;
94 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
94 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -103,7 +103,7 @@ Label {
103 elide: Text.ElideRight;
103 elide: Text.ElideRight;
104 fontSize: "small";
104 fontSize: "small";
105 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
105 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
106− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey";
106+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : root.foregroundColor;
107 visible: titleLabel.visible && titleLabel.text;
107 visible: titleLabel.visible && titleLabel.text;
108 text: cardData && cardData["subtitle"] || "";
108 text: cardData && cardData["subtitle"] || "";
109 font.weight: Font.Light;
109 font.weight: Font.Light;