on xenial help sign in
fix test
fe90e31Albert Astals
tests/plugins/Dash/cardcreator/5.res+4−3
@@ -68,7 +68,8 @@ Loader {
68 visible: showHeader && status == Loader.Ready;
68 visible: showHeader && status == Loader.Ready;
69 sourceComponent: ShaderEffect {
69 sourceComponent: ShaderEffect {
70 id: overlay;
70 id: overlay;
71− height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
71+ height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
72+ property real luminance: 0.2126 * overlayColor.r + 0.7152 * overlayColor.g + 0.0722 * overlayColor.b;
72 property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";
73 property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";
73 property var source: ShaderEffectSource {
74 property var source: ShaderEffectSource {
74 id: shaderSource;
75 id: shaderSource;
@@ -113,7 +114,7 @@ Label {
113 wrapMode: Text.Wrap;
114 wrapMode: Text.Wrap;
114 maximumLineCount: 2;
115 maximumLineCount: 2;
115 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
116 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
116− color: "white";
117+ color: overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
117 visible: showHeader && overlayLoader.active;
118 visible: showHeader && overlayLoader.active;
118 text: root.title;
119 text: root.title;
119 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
120 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -132,7 +133,7 @@ Label {
132 elide: Text.ElideRight;
133 elide: Text.ElideRight;
133 fontSize: "small";
134 fontSize: "small";
134 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
135 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
135− color: "white";
136+ color: overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
136 visible: titleLabel.visible && titleLabel.text;
137 visible: titleLabel.visible && titleLabel.text;
137 text: cardData && cardData["subtitle"] || "";
138 text: cardData && cardData["subtitle"] || "";
138 font.weight: Font.Light;
139 font.weight: Font.Light;