on xenial help sign in
Merge lp:~aacid/unity8/new-scopes-header-fix
5fc6641Albert Astals
qml/Dash/Card.qml+1
@@ -107,6 +107,7 @@ AbstractButton {
107 CardHeader {
107 CardHeader {
108 id: header
108 id: header
109 objectName: "cardHeader"
109 objectName: "cardHeader"
110+ inOverlay: root.template && root.template["overlay"] === true
110 anchors {
111 anchors {
111 top: {
112 top: {
112 if (template) {
113 if (template) {
qml/Dash/CardHeader.qml+4−3
@@ -30,6 +30,7 @@ Item {
30 property real fontScale: 1.0
30 property real fontScale: 1.0
31
31
32 property alias headerAlignment: titleLabel.horizontalAlignment
32 property alias headerAlignment: titleLabel.horizontalAlignment
33+ property bool inOverlay: false
33
34
34 visible: mascotImage.status === Image.Ready || title || price
35 visible: mascotImage.status === Image.Ready || title || price
35 height: row.height > 0 ? row.height + row.margins * 2 : 0
36 height: row.height > 0 ? row.height + row.margins * 2 : 0
@@ -46,7 +47,7 @@ Item {
46 leftMargin: spacing
47 leftMargin: spacing
47 rightMargin: spacing
48 rightMargin: spacing
48 }
49 }
49− spacing: mascotShape.visible || (template && template["overlay"]) ? margins : 0
50+ spacing: mascotShape.visible || inOverlay ? margins : 0
50
51
51 UbuntuShape {
52 UbuntuShape {
52 id: mascotShape
53 id: mascotShape
@@ -83,7 +84,7 @@ Item {
83 maximumLineCount: 2
84 maximumLineCount: 2
84 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
85 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
85 // TODO karni (for each Label): Update Ubuntu.Components.Themes.Palette and use theme color instead
86 // TODO karni (for each Label): Update Ubuntu.Components.Themes.Palette and use theme color instead
86− color: template["overlay"] === true ? "white" : "grey" // Theme.palette.normal.backgroundText
87+ color: inOverlay ? "white" : "grey" // Theme.palette.normal.backgroundText
87 }
88 }
88
89
89 Label {
90 Label {
@@ -94,7 +95,7 @@ Item {
94 font.weight: Font.Light
95 font.weight: Font.Light
95 visible: titleLabel.text && text
96 visible: titleLabel.text && text
96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
97 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
97− color: template["overlay"] === true ? "white" : "grey" // Theme.palette.normal.backgroundText
98+ color: inOverlay ? "white" : "grey" // Theme.palette.normal.backgroundText
98 }
99 }
99
100
100 Row {
101 Row {