on xenial help sign in
Few styling changes for cards

Approved by: Albert Astals Cid, Unity8 CI Bot

commit3ab9ac2be9ab2eac0acf61c6d32270cc8e16a51f authorAndrea Cimitan <andrea.cimitan@gmail.com> dateWed 9 Nov 2016, 15:02 (10 years ago) parent8ee8002c7c9a05
33 files changed+96−109
plugins/Dash/CardAttributes.qml+1−1 plugins/Dash/CardCreator.js+9−8 qml/Dash/CardGrid.qml+2−1 qml/Dash/CardTool.qml+1−1 tests/plugins/Dash/cardcreator/1.res+5−5 tests/plugins/Dash/cardcreator/1.res.cardcreator+4−4 tests/plugins/Dash/cardcreator/1.tst+1−1 tests/plugins/Dash/cardcreator/10.res+3−3 tests/plugins/Dash/cardcreator/10.res.cardcreator+3−3 tests/plugins/Dash/cardcreator/11.res+5−5 tests/plugins/Dash/cardcreator/11.res.cardcreator+4−4 tests/plugins/Dash/cardcreator/12.res+4−4 tests/plugins/Dash/cardcreator/12.res.cardcreator+3−3 tests/plugins/Dash/cardcreator/2.res+3−3 tests/plugins/Dash/cardcreator/2.res.cardcreator+3−3 tests/plugins/Dash/cardcreator/3.res+2−2 tests/plugins/Dash/cardcreator/3.res.cardcreator+2−2 tests/plugins/Dash/cardcreator/4.res+3−3 tests/plugins/Dash/cardcreator/4.res.cardcreator+2−2 tests/plugins/Dash/cardcreator/5.res+3−3 tests/plugins/Dash/cardcreator/5.res.cardcreator+3−3 tests/plugins/Dash/cardcreator/6.res+4−4 tests/plugins/Dash/cardcreator/6.res.cardcreator+3−3 tests/plugins/Dash/cardcreator/6.tst+1−1 tests/plugins/Dash/cardcreator/7.res+3−3 tests/plugins/Dash/cardcreator/7.res.cardcreator+3−3 tests/plugins/Dash/cardcreator/8.res+4−4 tests/plugins/Dash/cardcreator/8.res.cardcreator+3−3 tests/plugins/Dash/cardcreator/8.tst+1−1 tests/plugins/Dash/cardcreator/9.res+4−4 tests/plugins/Dash/cardcreator/9.res.cardcreator+3−3 tests/plugins/Dash/cardcreator/9.tst+1−1 tests/qmltests/Dash/tst_Card.qml−15
plugins/Dash/CardAttributes.qml+1−1
@@ -62,7 +62,7 @@ GridLayout {
6262 elide: Text.ElideRight
6363 maximumLineCount: 1
6464 font.weight: "style" in modelData && modelData["style"] === "highlighted" ? Font.Bold : Font.Light
65− fontSize: "small"
65+ fontSize: "x-small"
6666 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
6767 color: grid.color
6868 }
plugins/Dash/CardCreator.js+9−8
@@ -28,7 +28,7 @@ var kBackgroundLoaderCode = 'Loader {\n\
2828 visible: status === Loader.Ready; \n\
2929 sourceComponent: UbuntuShape { \n\
3030 objectName: "background"; \n\
31− radius: "medium"; \n\
31+ radius: "small"; \n\
3232 aspect: { \n\
3333 switch (root.backgroundShapeStyle) { \n\
3434 case "inset": return UbuntuShape.Inset; \n\
@@ -64,7 +64,7 @@ var kArtUbuntuShapeCode = 'UbuntuShape { \n\
6464 anchors.fill: parent; \n\
6565 source: artImage; \n\
6666 sourceFillMode: UbuntuShape.PreserveAspectCrop; \n\
67− radius: "medium"; \n\
67+ radius: "small"; \n\
6868 aspect: %1; \n\
6969 }';
7070
@@ -166,7 +166,7 @@ var kAudioButtonCode = 'AbstractButton { \n\
166166 UbuntuShape { \n\
167167 anchors.fill: parent; \n\
168168 visible: parent.pressed; \n\
169− radius: "medium"; \n\
169+ radius: "small"; \n\
170170 } \n\
171171 Rectangle { \n\
172172 color: Qt.rgba(0, 0, 0, 0.5); \n\
@@ -214,7 +214,7 @@ var kOverlayLoaderCode = 'Loader { \n\
214214 id: overlay; \n\
215215 property real luminance: Style.luminance(overlayColor); \n\
216216 aspect: UbuntuShape.Flat; \n\
217− radius: "medium"; \n\
217+ radius: "small"; \n\
218218 overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
219219 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1); \n\
220220 } \n\
@@ -308,7 +308,7 @@ var kTitleLabelCode = 'Label { \n\
308308 visible: showHeader %3; \n\
309309 width: %4; \n\
310310 text: root.title; \n\
311− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal; \n\
311+ font.weight: Font.Normal; \n\
312312 horizontalAlignment: %5; \n\
313313 }\n';
314314
@@ -337,7 +337,7 @@ var kTouchdownCode = 'Loader { \n\
337337 sourceComponent: UbuntuShape { \n\
338338 objectName: "touchdown"; \n\
339339 anchors.fill: parent; \n\
340− radius: "medium"; \n\
340+ radius: "small"; \n\
341341 borderSource: "radius_pressed.sci" \n\
342342 } \n\
343343 }\n';
@@ -399,7 +399,8 @@ var kSummaryLabelCode = 'Label { \n\
399399 elide: Text.ElideRight; \n\
400400 text: cardData && cardData["summary"] || ""; \n\
401401 height: text ? implicitHeight : 0; \n\
402− fontSize: "small"; \n\
402+ fontSize: "x-small"; \n\
403+ font.weight: Font.Light; \n\
403404 color: %3; \n\
404405 }\n';
405406
@@ -439,7 +440,7 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
439440 code = 'AbstractButton { \n\
440441 id: root; \n\
441442 property var cardData; \n\
442− property string backgroundShapeStyle: "inset"; \n\
443+ property string backgroundShapeStyle: "flat"; \n\
443444 property real fontScale: 1.0; \n\
444445 property var scopeStyle: null; \n\
445446 readonly property string title: cardData && cardData["title"] || ""; \n\
qml/Dash/CardGrid.qml+2−1
@@ -24,8 +24,9 @@ DashRenderer {
2424 if (!cardTool || !cardTool.template || typeof cardTool.template["collapsed-rows"] != "number") return 2;
2525 return cardTool.template["collapsed-rows"];
2626 }
27+
2728 // ↓ This is the ubuntu store icon
28− readonly property string backgroundShapeStyle: cardTool.isAppLikeScope && !cardTool.isAppLikeScopeAppCategory ? "shadow" : "inset"
29+ readonly property string backgroundShapeStyle: cardTool.isAppLikeScope && !cardTool.isAppLikeScopeAppCategory ? "shadow" : "flat"
2930
3031 expandedHeight: grid.totalContentHeight
3132 collapsedHeight: Math.min(grid.contentHeightForRows(collapsedRows, grid.cellHeight), expandedHeight)
qml/Dash/CardTool.qml+1−1
@@ -85,7 +85,7 @@ Item {
8585 if (isAppLikeScope) {
8686 return isAppLikeScopeAppCategory ? "icon" : "flat";
8787 } else {
88− return categoryLayout === "carousel" ? "shadow" : "inset"
88+ return categoryLayout === "carousel" ? "shadow" : "flat"
8989 }
9090 }
9191
tests/plugins/Dash/cardcreator/1.res+5−5
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -31,8 +31,8 @@ Loader {
3131 anchors.fill: parent;
3232 source: artImage;
3333 sourceFillMode: UbuntuShape.PreserveAspectCrop;
34− radius: "medium";
35− aspect: UbuntuShape.Inset;
34+ radius: "small";
35+ aspect: UbuntuShape.Flat;
3636 }
3737 width: root.fixedArtShapeSize.width;
3838 height: root.fixedArtShapeSize.height;
@@ -65,7 +65,7 @@ Label {
6565 visible: showHeader ;
6666 width: undefined;
6767 text: root.title;
68− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
68+ font.weight: Font.Normal;
6969 horizontalAlignment: Text.AlignHCenter;
7070 }
7171Loader {
@@ -74,7 +74,7 @@ Loader {
7474 sourceComponent: UbuntuShape {
7575 objectName: "touchdown";
7676 anchors.fill: parent;
77− radius: "medium";
77+ radius: "small";
7878 borderSource: "radius_pressed.sci"
7979 }
8080}
tests/plugins/Dash/cardcreator/1.res.cardcreator+4−4
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -28,8 +28,8 @@ Loader {
2828 anchors.fill: parent;
2929 source: artImage;
3030 sourceFillMode: UbuntuShape.PreserveAspectCrop;
31− radius: "medium";
32− aspect: UbuntuShape.Inset;
31+ radius: "small";
32+ aspect: UbuntuShape.Flat;
3333 }
3434 width: image.status !== Image.Ready ? 0 : image.width;
3535 height: image.status !== Image.Ready ? 0 : image.height;
@@ -62,7 +62,7 @@ Label {
6262 visible: showHeader ;
6363 width: undefined;
6464 text: root.title;
65− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
65+ font.weight: Font.Normal;
6666 horizontalAlignment: Text.AlignHCenter;
6767 }
6868implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);
tests/plugins/Dash/cardcreator/1.tst+1−1
@@ -1,4 +1,4 @@
11template: {"card-layout":"vertical","card-size":"small","category-layout":"grid","collapsed-rows":2}
22components: {"art":{"aspect-ratio":1.6,"field":"art"},"title":{"field":"title"},"attributes":{}}
3−artShapeStyle: inset
3+artShapeStyle: flat
44result: 1.res
tests/plugins/Dash/cardcreator/10.res+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
1919 visible: status === Loader.Ready;
2020 sourceComponent: UbuntuShape {
2121 objectName: "background";
22− radius: "medium";
22+ radius: "small";
2323 aspect: {
2424 switch (root.backgroundShapeStyle) {
2525 case "inset": return UbuntuShape.Inset;
@@ -98,7 +98,7 @@ left: parent.left;
9898 visible: showHeader ;
9999 width: undefined;
100100 text: root.title;
101− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
101+ font.weight: Font.Normal;
102102 horizontalAlignment: Text.AlignLeft;
103103 }
104104,Label {
tests/plugins/Dash/cardcreator/10.res.cardcreator+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
1717 visible: status === Loader.Ready;
1818 sourceComponent: UbuntuShape {
1919 objectName: "background";
20− radius: "medium";
20+ radius: "small";
2121 aspect: {
2222 switch (root.backgroundShapeStyle) {
2323 case "inset": return UbuntuShape.Inset;
@@ -96,7 +96,7 @@ left: parent.left;
9696 visible: showHeader ;
9797 width: undefined;
9898 text: root.title;
99− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
99+ font.weight: Font.Normal;
100100 horizontalAlignment: Text.AlignLeft;
101101 }
102102,Label {
tests/plugins/Dash/cardcreator/11.res+5−5
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
1919 visible: status === Loader.Ready;
2020 sourceComponent: UbuntuShape {
2121 objectName: "background";
22− radius: "medium";
22+ radius: "small";
2323 aspect: {
2424 switch (root.backgroundShapeStyle) {
2525 case "inset": return UbuntuShape.Inset;
@@ -69,7 +69,7 @@ Loader {
6969 anchors.fill: parent;
7070 source: artImage;
7171 sourceFillMode: UbuntuShape.PreserveAspectCrop;
72− radius: "medium";
72+ radius: "small";
7373 aspect: UbuntuShape.Flat;
7474 }
7575 width: root.fixedArtShapeSize.width;
@@ -135,7 +135,7 @@ left: parent.left;
135135 visible: showHeader ;
136136 width: undefined;
137137 text: root.title;
138− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
138+ font.weight: Font.Normal;
139139 horizontalAlignment: Text.AlignLeft;
140140 }
141141,Label {
@@ -168,7 +168,7 @@ Loader {
168168 sourceComponent: UbuntuShape {
169169 objectName: "touchdown";
170170 anchors.fill: parent;
171− radius: "medium";
171+ radius: "small";
172172 borderSource: "radius_pressed.sci"
173173 }
174174}
tests/plugins/Dash/cardcreator/11.res.cardcreator+4−4
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
1717 visible: status === Loader.Ready;
1818 sourceComponent: UbuntuShape {
1919 objectName: "background";
20− radius: "medium";
20+ radius: "small";
2121 aspect: {
2222 switch (root.backgroundShapeStyle) {
2323 case "inset": return UbuntuShape.Inset;
@@ -66,7 +66,7 @@ Loader {
6666 anchors.fill: parent;
6767 source: artImage;
6868 sourceFillMode: UbuntuShape.PreserveAspectCrop;
69− radius: "medium";
69+ radius: "small";
7070 aspect: UbuntuShape.Flat;
7171 }
7272 width: image.status !== Image.Ready ? 0 : image.width;
@@ -129,7 +129,7 @@ left: parent.left;
129129 visible: showHeader ;
130130 width: undefined;
131131 text: root.title;
132− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
132+ font.weight: Font.Normal;
133133 horizontalAlignment: Text.AlignLeft;
134134 }
135135,Label {
tests/plugins/Dash/cardcreator/12.res+4−4
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -31,7 +31,7 @@ Loader {
3131 anchors.fill: parent;
3232 source: artImage;
3333 sourceFillMode: UbuntuShape.PreserveAspectCrop;
34− radius: "medium";
34+ radius: "small";
3535 aspect: UbuntuShape.Flat;
3636 }
3737 width: root.fixedArtShapeSize.width;
@@ -65,7 +65,7 @@ Label {
6565 visible: showHeader ;
6666 width: undefined;
6767 text: root.title;
68− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
68+ font.weight: Font.Normal;
6969 horizontalAlignment: Text.AlignLeft;
7070 }
7171Label {
@@ -100,7 +100,7 @@ Loader {
100100 sourceComponent: UbuntuShape {
101101 objectName: "touchdown";
102102 anchors.fill: parent;
103− radius: "medium";
103+ radius: "small";
104104 borderSource: "radius_pressed.sci"
105105 }
106106}
tests/plugins/Dash/cardcreator/12.res.cardcreator+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -28,7 +28,7 @@ Loader {
2828 anchors.fill: parent;
2929 source: artImage;
3030 sourceFillMode: UbuntuShape.PreserveAspectCrop;
31− radius: "medium";
31+ radius: "small";
3232 aspect: UbuntuShape.Flat;
3333 }
3434 width: image.status !== Image.Ready ? 0 : image.width;
@@ -62,7 +62,7 @@ Label {
6262 visible: showHeader ;
6363 width: undefined;
6464 text: root.title;
65− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
65+ font.weight: Font.Normal;
6666 horizontalAlignment: Text.AlignLeft;
6767 }
6868Label {
tests/plugins/Dash/cardcreator/2.res+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
1919 visible: status === Loader.Ready;
2020 sourceComponent: UbuntuShape {
2121 objectName: "background";
22− radius: "medium";
22+ radius: "small";
2323 aspect: {
2424 switch (root.backgroundShapeStyle) {
2525 case "inset": return UbuntuShape.Inset;
@@ -97,7 +97,7 @@ CroppedImageMinimumSourceSize {
9797 visible: showHeader ;
9898 width: undefined;
9999 text: root.title;
100− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
100+ font.weight: Font.Normal;
101101 horizontalAlignment: Text.AlignLeft;
102102 }
103103 ,Label {
tests/plugins/Dash/cardcreator/2.res.cardcreator+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
1717 visible: status === Loader.Ready;
1818 sourceComponent: UbuntuShape {
1919 objectName: "background";
20− radius: "medium";
20+ radius: "small";
2121 aspect: {
2222 switch (root.backgroundShapeStyle) {
2323 case "inset": return UbuntuShape.Inset;
@@ -95,7 +95,7 @@ CroppedImageMinimumSourceSize {
9595 visible: showHeader ;
9696 width: undefined;
9797 text: root.title;
98− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
98+ font.weight: Font.Normal;
9999 horizontalAlignment: Text.AlignLeft;
100100 }
101101 ,Label {
tests/plugins/Dash/cardcreator/3.res+2−2
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -65,7 +65,7 @@ Label {
6565 visible: showHeader ;
6666 width: undefined;
6767 text: root.title;
68− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
68+ font.weight: Font.Normal;
6969 horizontalAlignment: Text.AlignLeft;
7070 }
7171Label {
tests/plugins/Dash/cardcreator/3.res.cardcreator+2−2
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -61,7 +61,7 @@ Label {
6161 visible: showHeader ;
6262 width: undefined;
6363 text: root.title;
64− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
64+ font.weight: Font.Normal;
6565 horizontalAlignment: Text.AlignLeft;
6666 }
6767Label {
tests/plugins/Dash/cardcreator/4.res+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -72,7 +72,7 @@ Label {
7272 visible: showHeader ;
7373 width: undefined;
7474 text: root.title;
75− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
75+ font.weight: Font.Normal;
7676 horizontalAlignment: Text.AlignLeft;
7777 }
7878,Label {
@@ -103,7 +103,7 @@ Loader {
103103 sourceComponent: UbuntuShape {
104104 objectName: "touchdown";
105105 anchors.fill: parent;
106− radius: "medium";
106+ radius: "small";
107107 borderSource: "radius_pressed.sci"
108108 }
109109}
tests/plugins/Dash/cardcreator/4.res.cardcreator+2−2
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -70,7 +70,7 @@ Label {
7070 visible: showHeader ;
7171 width: undefined;
7272 text: root.title;
73− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
73+ font.weight: Font.Normal;
7474 horizontalAlignment: Text.AlignLeft;
7575 }
7676,Label {
tests/plugins/Dash/cardcreator/5.res+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -51,7 +51,7 @@ Loader {
5151 id: overlay;
5252 property real luminance: Style.luminance(overlayColor);
5353 aspect: UbuntuShape.Flat;
54− radius: "medium";
54+ radius: "small";
5555 overlayColor: cardData && cardData["overlayColor"] || "#99000000";
5656 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
5757 }
@@ -76,7 +76,7 @@ Label {
7676 visible: showHeader && overlayLoader.active;
7777 width: undefined;
7878 text: root.title;
79− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
79+ font.weight: Font.Normal;
8080 horizontalAlignment: Text.AlignLeft;
8181 }
8282Label {
tests/plugins/Dash/cardcreator/5.res.cardcreator+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -48,7 +48,7 @@ Loader {
4848 id: overlay;
4949 property real luminance: Style.luminance(overlayColor);
5050 aspect: UbuntuShape.Flat;
51− radius: "medium";
51+ radius: "small";
5252 overlayColor: cardData && cardData["overlayColor"] || "#99000000";
5353 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
5454 }
@@ -73,7 +73,7 @@ Label {
7373 visible: showHeader && overlayLoader.active;
7474 width: undefined;
7575 text: root.title;
76− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
76+ font.weight: Font.Normal;
7777 horizontalAlignment: Text.AlignLeft;
7878 }
7979Label {
tests/plugins/Dash/cardcreator/6.res+4−4
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
1919 visible: status === Loader.Ready;
2020 sourceComponent: UbuntuShape {
2121 objectName: "background";
22− radius: "medium";
22+ radius: "small";
2323 aspect: {
2424 switch (root.backgroundShapeStyle) {
2525 case "inset": return UbuntuShape.Inset;
@@ -76,7 +76,7 @@ Item {
7676 visible: showHeader ;
7777 width: undefined;
7878 text: root.title;
79− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
79+ font.weight: Font.Normal;
8080 horizontalAlignment: Text.AlignLeft;
8181 }
8282,Label {
@@ -119,7 +119,7 @@ Loader {
119119 sourceComponent: UbuntuShape {
120120 objectName: "touchdown";
121121 anchors.fill: parent;
122− radius: "medium";
122+ radius: "small";
123123 borderSource: "radius_pressed.sci"
124124 }
125125}
tests/plugins/Dash/cardcreator/6.res.cardcreator+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
1717 visible: status === Loader.Ready;
1818 sourceComponent: UbuntuShape {
1919 objectName: "background";
20− radius: "medium";
20+ radius: "small";
2121 aspect: {
2222 switch (root.backgroundShapeStyle) {
2323 case "inset": return UbuntuShape.Inset;
@@ -75,7 +75,7 @@ Item {
7575 visible: showHeader ;
7676 width: undefined;
7777 text: root.title;
78− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
78+ font.weight: Font.Normal;
7979 horizontalAlignment: Text.AlignLeft;
8080 }
8181,Label {
tests/plugins/Dash/cardcreator/6.tst+1−1
@@ -1,4 +1,4 @@
11template: {"card-background":"http://assets.ubuntu.com/sites/ubuntu/latest/u/img/logos/logo-ubuntu-grey.png","card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
22components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"subtitle":{"field":"author"},"title":{"field":"title"},"emblem":{"field":"source"},"attributes":{}}
3−artShapeStyle: inset
3+artShapeStyle: flat
44result: 6.res
tests/plugins/Dash/cardcreator/7.res+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
1919 visible: status === Loader.Ready;
2020 sourceComponent: UbuntuShape {
2121 objectName: "background";
22− radius: "medium";
22+ radius: "small";
2323 aspect: {
2424 switch (root.backgroundShapeStyle) {
2525 case "inset": return UbuntuShape.Inset;
@@ -98,7 +98,7 @@ CroppedImageMinimumSourceSize {
9898 visible: showHeader ;
9999 width: undefined;
100100 text: root.title;
101− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
101+ font.weight: Font.Normal;
102102 horizontalAlignment: Text.AlignLeft;
103103 }
104104,Label {
tests/plugins/Dash/cardcreator/7.res.cardcreator+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
1717 visible: status === Loader.Ready;
1818 sourceComponent: UbuntuShape {
1919 objectName: "background";
20− radius: "medium";
20+ radius: "small";
2121 aspect: {
2222 switch (root.backgroundShapeStyle) {
2323 case "inset": return UbuntuShape.Inset;
@@ -96,7 +96,7 @@ CroppedImageMinimumSourceSize {
9696 visible: showHeader ;
9797 width: undefined;
9898 text: root.title;
99− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
99+ font.weight: Font.Normal;
100100 horizontalAlignment: Text.AlignLeft;
101101 }
102102,Label {
tests/plugins/Dash/cardcreator/8.res+4−4
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
1919 visible: status === Loader.Ready;
2020 sourceComponent: UbuntuShape {
2121 objectName: "background";
22− radius: "medium";
22+ radius: "small";
2323 aspect: {
2424 switch (root.backgroundShapeStyle) {
2525 case "inset": return UbuntuShape.Inset;
@@ -89,7 +89,7 @@ left: parent.left;
8989 visible: showHeader ;
9090 width: parent.width - x;
9191 text: root.title;
92− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
92+ font.weight: Font.Normal;
9393 horizontalAlignment: Text.AlignLeft;
9494 }
9595
@@ -101,7 +101,7 @@ Loader {
101101 sourceComponent: UbuntuShape {
102102 objectName: "touchdown";
103103 anchors.fill: parent;
104− radius: "medium";
104+ radius: "small";
105105 borderSource: "radius_pressed.sci"
106106 }
107107}
tests/plugins/Dash/cardcreator/8.res.cardcreator+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
1717 visible: status === Loader.Ready;
1818 sourceComponent: UbuntuShape {
1919 objectName: "background";
20− radius: "medium";
20+ radius: "small";
2121 aspect: {
2222 switch (root.backgroundShapeStyle) {
2323 case "inset": return UbuntuShape.Inset;
@@ -87,7 +87,7 @@ left: parent.left;
8787 visible: showHeader ;
8888 width: parent.width - x;
8989 text: root.title;
90− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
90+ font.weight: Font.Normal;
9191 horizontalAlignment: Text.AlignLeft;
9292 }
9393
tests/plugins/Dash/cardcreator/8.tst+1−1
@@ -1,4 +1,4 @@
11template: {"card-background":{"elements":["#E9E9E9","#E9AAE9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
22components: {"background":{"field":"background"},"mascot":{"field":"icon"},"title":{"field":"title"},"attributes":{}}
3−artShapeStyle: inset
3+artShapeStyle: flat
44result: 8.res
tests/plugins/Dash/cardcreator/9.res+4−4
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -31,7 +31,7 @@ top: parent.top;
3131 visible: showHeader ;
3232 width: undefined;
3333 text: root.title;
34− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
34+ font.weight: Font.Normal;
3535 horizontalAlignment: Text.AlignLeft;
3636 }
3737Label {
@@ -73,7 +73,7 @@ CardAudioProgress {
7373 UbuntuShape {
7474 anchors.fill: parent;
7575 visible: parent.pressed;
76− radius: "medium";
76+ radius: "small";
7777 }
7878 Rectangle {
7979 color: Qt.rgba(0, 0, 0, 0.5);
@@ -112,7 +112,7 @@ CardAudioProgress {
112112 sourceComponent: UbuntuShape {
113113 objectName: "touchdown";
114114 anchors.fill: parent;
115− radius: "medium";
115+ radius: "small";
116116 borderSource: "radius_pressed.sci"
117117 }
118118}
tests/plugins/Dash/cardcreator/9.res.cardcreator+3−3
@@ -1,7 +1,7 @@
11AbstractButton {
22 id: root;
33 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
55 property real fontScale: 1.0;
66 property var scopeStyle: null;
77 readonly property string title: cardData && cardData["title"] || "";
@@ -30,7 +30,7 @@ top: parent.top;
3030 visible: showHeader ;
3131 width: undefined;
3232 text: root.title;
33− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
33+ font.weight: Font.Normal;
3434 horizontalAlignment: Text.AlignLeft;
3535 }
3636Label {
@@ -72,7 +72,7 @@ CardAudioProgress {
7272 UbuntuShape {
7373 anchors.fill: parent;
7474 visible: parent.pressed;
75− radius: "medium";
75+ radius: "small";
7676 }
7777 Rectangle {
7878 color: Qt.rgba(0, 0, 0, 0.5);
tests/plugins/Dash/cardcreator/9.tst+1−1
@@ -1,4 +1,4 @@
11template: {"card-layout":"horizontal","card-size":"medium","category-layout":"grid","collapsed-rows":2,"quick-preview-type": "audio"}
22components: {"art":{"aspect-ratio":1},"subtitle":{"field":"author"},"title":{"field":"title"}, "quickPreviewData": "quickPreviewData"}
3−artShapeStyle: inset
3+artShapeStyle: flat
44result: 9.res
tests/qmltests/Dash/tst_Card.qml−15
@@ -529,21 +529,6 @@ Rectangle {
529529 compare(mascotImage.source, Qt.resolvedUrl("artwork/checkers.png"));
530530 }
531531
532− function test_font_weights_data() {
533− return [
534− { tag: "Title only", index: 8, weight: Font.Normal },
535− { tag: "Title, subtitle", index: 0, weight: Font.DemiBold },
536− ]
537− }
538−
539− function test_font_weights(data) {
540− selector.selectedIndex = data.index;
541− waitForRendering(selector);
542− waitForRendering(card);
543−
544− tryCompare(testCase.title.font, "weight", data.weight);
545− }
546−
547532 function test_fontColor_data() {
548533 return [
549534 { tag: "#ffffff", dark: true },