on xenial help sign in
Few styling changes for cards
3ab9ac2Andrea Cimitan
plugins/Dash/CardAttributes.qml+1−1
@@ -62,7 +62,7 @@ GridLayout {
62 elide: Text.ElideRight
62 elide: Text.ElideRight
63 maximumLineCount: 1
63 maximumLineCount: 1
64 font.weight: "style" in modelData && modelData["style"] === "highlighted" ? Font.Bold : Font.Light
64 font.weight: "style" in modelData && modelData["style"] === "highlighted" ? Font.Bold : Font.Light
65− fontSize: "small"
65+ fontSize: "x-small"
66 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
66 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
67 color: grid.color
67 color: grid.color
68 }
68 }
plugins/Dash/CardCreator.js+9−8
@@ -28,7 +28,7 @@ var kBackgroundLoaderCode = 'Loader {\n\
28 visible: status === Loader.Ready; \n\
28 visible: status === Loader.Ready; \n\
29 sourceComponent: UbuntuShape { \n\
29 sourceComponent: UbuntuShape { \n\
30 objectName: "background"; \n\
30 objectName: "background"; \n\
31− radius: "medium"; \n\
31+ radius: "small"; \n\
32 aspect: { \n\
32 aspect: { \n\
33 switch (root.backgroundShapeStyle) { \n\
33 switch (root.backgroundShapeStyle) { \n\
34 case "inset": return UbuntuShape.Inset; \n\
34 case "inset": return UbuntuShape.Inset; \n\
@@ -64,7 +64,7 @@ var kArtUbuntuShapeCode = 'UbuntuShape { \n\
64 anchors.fill: parent; \n\
64 anchors.fill: parent; \n\
65 source: artImage; \n\
65 source: artImage; \n\
66 sourceFillMode: UbuntuShape.PreserveAspectCrop; \n\
66 sourceFillMode: UbuntuShape.PreserveAspectCrop; \n\
67− radius: "medium"; \n\
67+ radius: "small"; \n\
68 aspect: %1; \n\
68 aspect: %1; \n\
69 }';
69 }';
70
70
@@ -166,7 +166,7 @@ var kAudioButtonCode = 'AbstractButton { \n\
166 UbuntuShape { \n\
166 UbuntuShape { \n\
167 anchors.fill: parent; \n\
167 anchors.fill: parent; \n\
168 visible: parent.pressed; \n\
168 visible: parent.pressed; \n\
169− radius: "medium"; \n\
169+ radius: "small"; \n\
170 } \n\
170 } \n\
171 Rectangle { \n\
171 Rectangle { \n\
172 color: Qt.rgba(0, 0, 0, 0.5); \n\
172 color: Qt.rgba(0, 0, 0, 0.5); \n\
@@ -214,7 +214,7 @@ var kOverlayLoaderCode = 'Loader { \n\
214 id: overlay; \n\
214 id: overlay; \n\
215 property real luminance: Style.luminance(overlayColor); \n\
215 property real luminance: Style.luminance(overlayColor); \n\
216 aspect: UbuntuShape.Flat; \n\
216 aspect: UbuntuShape.Flat; \n\
217− radius: "medium"; \n\
217+ radius: "small"; \n\
218 overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
218 overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
219 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1); \n\
219 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1); \n\
220 } \n\
220 } \n\
@@ -308,7 +308,7 @@ var kTitleLabelCode = 'Label { \n\
308 visible: showHeader %3; \n\
308 visible: showHeader %3; \n\
309 width: %4; \n\
309 width: %4; \n\
310 text: root.title; \n\
310 text: root.title; \n\
311− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal; \n\
311+ font.weight: Font.Normal; \n\
312 horizontalAlignment: %5; \n\
312 horizontalAlignment: %5; \n\
313 }\n';
313 }\n';
314
314
@@ -337,7 +337,7 @@ var kTouchdownCode = 'Loader { \n\
337 sourceComponent: UbuntuShape { \n\
337 sourceComponent: UbuntuShape { \n\
338 objectName: "touchdown"; \n\
338 objectName: "touchdown"; \n\
339 anchors.fill: parent; \n\
339 anchors.fill: parent; \n\
340− radius: "medium"; \n\
340+ radius: "small"; \n\
341 borderSource: "radius_pressed.sci" \n\
341 borderSource: "radius_pressed.sci" \n\
342 } \n\
342 } \n\
343 }\n';
343 }\n';
@@ -399,7 +399,8 @@ var kSummaryLabelCode = 'Label { \n\
399 elide: Text.ElideRight; \n\
399 elide: Text.ElideRight; \n\
400 text: cardData && cardData["summary"] || ""; \n\
400 text: cardData && cardData["summary"] || ""; \n\
401 height: text ? implicitHeight : 0; \n\
401 height: text ? implicitHeight : 0; \n\
402− fontSize: "small"; \n\
402+ fontSize: "x-small"; \n\
403+ font.weight: Font.Light; \n\
403 color: %3; \n\
404 color: %3; \n\
404 }\n';
405 }\n';
405
406
@@ -439,7 +440,7 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
439 code = 'AbstractButton { \n\
440 code = 'AbstractButton { \n\
440 id: root; \n\
441 id: root; \n\
441 property var cardData; \n\
442 property var cardData; \n\
442− property string backgroundShapeStyle: "inset"; \n\
443+ property string backgroundShapeStyle: "flat"; \n\
443 property real fontScale: 1.0; \n\
444 property real fontScale: 1.0; \n\
444 property var scopeStyle: null; \n\
445 property var scopeStyle: null; \n\
445 readonly property string title: cardData && cardData["title"] || ""; \n\
446 readonly property string title: cardData && cardData["title"] || ""; \n\
qml/Dash/CardGrid.qml+2−1
@@ -24,8 +24,9 @@ DashRenderer {
24 if (!cardTool || !cardTool.template || typeof cardTool.template["collapsed-rows"] != "number") return 2;
24 if (!cardTool || !cardTool.template || typeof cardTool.template["collapsed-rows"] != "number") return 2;
25 return cardTool.template["collapsed-rows"];
25 return cardTool.template["collapsed-rows"];
26 }
26 }
27+
27 // ↓ This is the ubuntu store icon
28 // ↓ 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"
29
30
30 expandedHeight: grid.totalContentHeight
31 expandedHeight: grid.totalContentHeight
31 collapsedHeight: Math.min(grid.contentHeightForRows(collapsedRows, grid.cellHeight), expandedHeight)
32 collapsedHeight: Math.min(grid.contentHeightForRows(collapsedRows, grid.cellHeight), expandedHeight)
qml/Dash/CardTool.qml+1−1
@@ -85,7 +85,7 @@ Item {
85 if (isAppLikeScope) {
85 if (isAppLikeScope) {
86 return isAppLikeScopeAppCategory ? "icon" : "flat";
86 return isAppLikeScopeAppCategory ? "icon" : "flat";
87 } else {
87 } else {
88− return categoryLayout === "carousel" ? "shadow" : "inset"
88+ return categoryLayout === "carousel" ? "shadow" : "flat"
89 }
89 }
90 }
90 }
91
91
tests/plugins/Dash/cardcreator/1.res+5−5
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -31,8 +31,8 @@ Loader {
31 anchors.fill: parent;
31 anchors.fill: parent;
32 source: artImage;
32 source: artImage;
33 sourceFillMode: UbuntuShape.PreserveAspectCrop;
33 sourceFillMode: UbuntuShape.PreserveAspectCrop;
34− radius: "medium";
34+ radius: "small";
35− aspect: UbuntuShape.Inset;
35+ aspect: UbuntuShape.Flat;
36 }
36 }
37 width: root.fixedArtShapeSize.width;
37 width: root.fixedArtShapeSize.width;
38 height: root.fixedArtShapeSize.height;
38 height: root.fixedArtShapeSize.height;
@@ -65,7 +65,7 @@ Label {
65 visible: showHeader ;
65 visible: showHeader ;
66 width: undefined;
66 width: undefined;
67 text: root.title;
67 text: root.title;
68− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
68+ font.weight: Font.Normal;
69 horizontalAlignment: Text.AlignHCenter;
69 horizontalAlignment: Text.AlignHCenter;
70 }
70 }
71Loader {
71Loader {
@@ -74,7 +74,7 @@ Loader {
74 sourceComponent: UbuntuShape {
74 sourceComponent: UbuntuShape {
75 objectName: "touchdown";
75 objectName: "touchdown";
76 anchors.fill: parent;
76 anchors.fill: parent;
77− radius: "medium";
77+ radius: "small";
78 borderSource: "radius_pressed.sci"
78 borderSource: "radius_pressed.sci"
79 }
79 }
80}
80}
tests/plugins/Dash/cardcreator/1.res.cardcreator+4−4
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -28,8 +28,8 @@ Loader {
28 anchors.fill: parent;
28 anchors.fill: parent;
29 source: artImage;
29 source: artImage;
30 sourceFillMode: UbuntuShape.PreserveAspectCrop;
30 sourceFillMode: UbuntuShape.PreserveAspectCrop;
31− radius: "medium";
31+ radius: "small";
32− aspect: UbuntuShape.Inset;
32+ aspect: UbuntuShape.Flat;
33 }
33 }
34 width: image.status !== Image.Ready ? 0 : image.width;
34 width: image.status !== Image.Ready ? 0 : image.width;
35 height: image.status !== Image.Ready ? 0 : image.height;
35 height: image.status !== Image.Ready ? 0 : image.height;
@@ -62,7 +62,7 @@ Label {
62 visible: showHeader ;
62 visible: showHeader ;
63 width: undefined;
63 width: undefined;
64 text: root.title;
64 text: root.title;
65− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
65+ font.weight: Font.Normal;
66 horizontalAlignment: Text.AlignHCenter;
66 horizontalAlignment: Text.AlignHCenter;
67 }
67 }
68implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);
68implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);
tests/plugins/Dash/cardcreator/1.tst+1−1
@@ -1,4 +1,4 @@
1template: {"card-layout":"vertical","card-size":"small","category-layout":"grid","collapsed-rows":2}
1template: {"card-layout":"vertical","card-size":"small","category-layout":"grid","collapsed-rows":2}
2components: {"art":{"aspect-ratio":1.6,"field":"art"},"title":{"field":"title"},"attributes":{}}
2components: {"art":{"aspect-ratio":1.6,"field":"art"},"title":{"field":"title"},"attributes":{}}
3−artShapeStyle: inset
3+artShapeStyle: flat
4result: 1.res
4result: 1.res
tests/plugins/Dash/cardcreator/10.res+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
19 visible: status === Loader.Ready;
19 visible: status === Loader.Ready;
20 sourceComponent: UbuntuShape {
20 sourceComponent: UbuntuShape {
21 objectName: "background";
21 objectName: "background";
22− radius: "medium";
22+ radius: "small";
23 aspect: {
23 aspect: {
24 switch (root.backgroundShapeStyle) {
24 switch (root.backgroundShapeStyle) {
25 case "inset": return UbuntuShape.Inset;
25 case "inset": return UbuntuShape.Inset;
@@ -98,7 +98,7 @@ left: parent.left;
98 visible: showHeader ;
98 visible: showHeader ;
99 width: undefined;
99 width: undefined;
100 text: root.title;
100 text: root.title;
101− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
101+ font.weight: Font.Normal;
102 horizontalAlignment: Text.AlignLeft;
102 horizontalAlignment: Text.AlignLeft;
103 }
103 }
104,Label {
104,Label {
tests/plugins/Dash/cardcreator/10.res.cardcreator+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
17 visible: status === Loader.Ready;
17 visible: status === Loader.Ready;
18 sourceComponent: UbuntuShape {
18 sourceComponent: UbuntuShape {
19 objectName: "background";
19 objectName: "background";
20− radius: "medium";
20+ radius: "small";
21 aspect: {
21 aspect: {
22 switch (root.backgroundShapeStyle) {
22 switch (root.backgroundShapeStyle) {
23 case "inset": return UbuntuShape.Inset;
23 case "inset": return UbuntuShape.Inset;
@@ -96,7 +96,7 @@ left: parent.left;
96 visible: showHeader ;
96 visible: showHeader ;
97 width: undefined;
97 width: undefined;
98 text: root.title;
98 text: root.title;
99− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
99+ font.weight: Font.Normal;
100 horizontalAlignment: Text.AlignLeft;
100 horizontalAlignment: Text.AlignLeft;
101 }
101 }
102,Label {
102,Label {
tests/plugins/Dash/cardcreator/11.res+5−5
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
19 visible: status === Loader.Ready;
19 visible: status === Loader.Ready;
20 sourceComponent: UbuntuShape {
20 sourceComponent: UbuntuShape {
21 objectName: "background";
21 objectName: "background";
22− radius: "medium";
22+ radius: "small";
23 aspect: {
23 aspect: {
24 switch (root.backgroundShapeStyle) {
24 switch (root.backgroundShapeStyle) {
25 case "inset": return UbuntuShape.Inset;
25 case "inset": return UbuntuShape.Inset;
@@ -69,7 +69,7 @@ Loader {
69 anchors.fill: parent;
69 anchors.fill: parent;
70 source: artImage;
70 source: artImage;
71 sourceFillMode: UbuntuShape.PreserveAspectCrop;
71 sourceFillMode: UbuntuShape.PreserveAspectCrop;
72− radius: "medium";
72+ radius: "small";
73 aspect: UbuntuShape.Flat;
73 aspect: UbuntuShape.Flat;
74 }
74 }
75 width: root.fixedArtShapeSize.width;
75 width: root.fixedArtShapeSize.width;
@@ -135,7 +135,7 @@ left: parent.left;
135 visible: showHeader ;
135 visible: showHeader ;
136 width: undefined;
136 width: undefined;
137 text: root.title;
137 text: root.title;
138− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
138+ font.weight: Font.Normal;
139 horizontalAlignment: Text.AlignLeft;
139 horizontalAlignment: Text.AlignLeft;
140 }
140 }
141,Label {
141,Label {
@@ -168,7 +168,7 @@ Loader {
168 sourceComponent: UbuntuShape {
168 sourceComponent: UbuntuShape {
169 objectName: "touchdown";
169 objectName: "touchdown";
170 anchors.fill: parent;
170 anchors.fill: parent;
171− radius: "medium";
171+ radius: "small";
172 borderSource: "radius_pressed.sci"
172 borderSource: "radius_pressed.sci"
173 }
173 }
174}
174}
tests/plugins/Dash/cardcreator/11.res.cardcreator+4−4
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
17 visible: status === Loader.Ready;
17 visible: status === Loader.Ready;
18 sourceComponent: UbuntuShape {
18 sourceComponent: UbuntuShape {
19 objectName: "background";
19 objectName: "background";
20− radius: "medium";
20+ radius: "small";
21 aspect: {
21 aspect: {
22 switch (root.backgroundShapeStyle) {
22 switch (root.backgroundShapeStyle) {
23 case "inset": return UbuntuShape.Inset;
23 case "inset": return UbuntuShape.Inset;
@@ -66,7 +66,7 @@ Loader {
66 anchors.fill: parent;
66 anchors.fill: parent;
67 source: artImage;
67 source: artImage;
68 sourceFillMode: UbuntuShape.PreserveAspectCrop;
68 sourceFillMode: UbuntuShape.PreserveAspectCrop;
69− radius: "medium";
69+ radius: "small";
70 aspect: UbuntuShape.Flat;
70 aspect: UbuntuShape.Flat;
71 }
71 }
72 width: image.status !== Image.Ready ? 0 : image.width;
72 width: image.status !== Image.Ready ? 0 : image.width;
@@ -129,7 +129,7 @@ left: parent.left;
129 visible: showHeader ;
129 visible: showHeader ;
130 width: undefined;
130 width: undefined;
131 text: root.title;
131 text: root.title;
132− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
132+ font.weight: Font.Normal;
133 horizontalAlignment: Text.AlignLeft;
133 horizontalAlignment: Text.AlignLeft;
134 }
134 }
135,Label {
135,Label {
tests/plugins/Dash/cardcreator/12.res+4−4
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -31,7 +31,7 @@ Loader {
31 anchors.fill: parent;
31 anchors.fill: parent;
32 source: artImage;
32 source: artImage;
33 sourceFillMode: UbuntuShape.PreserveAspectCrop;
33 sourceFillMode: UbuntuShape.PreserveAspectCrop;
34− radius: "medium";
34+ radius: "small";
35 aspect: UbuntuShape.Flat;
35 aspect: UbuntuShape.Flat;
36 }
36 }
37 width: root.fixedArtShapeSize.width;
37 width: root.fixedArtShapeSize.width;
@@ -65,7 +65,7 @@ Label {
65 visible: showHeader ;
65 visible: showHeader ;
66 width: undefined;
66 width: undefined;
67 text: root.title;
67 text: root.title;
68− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
68+ font.weight: Font.Normal;
69 horizontalAlignment: Text.AlignLeft;
69 horizontalAlignment: Text.AlignLeft;
70 }
70 }
71Label {
71Label {
@@ -100,7 +100,7 @@ Loader {
100 sourceComponent: UbuntuShape {
100 sourceComponent: UbuntuShape {
101 objectName: "touchdown";
101 objectName: "touchdown";
102 anchors.fill: parent;
102 anchors.fill: parent;
103− radius: "medium";
103+ radius: "small";
104 borderSource: "radius_pressed.sci"
104 borderSource: "radius_pressed.sci"
105 }
105 }
106}
106}
tests/plugins/Dash/cardcreator/12.res.cardcreator+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -28,7 +28,7 @@ Loader {
28 anchors.fill: parent;
28 anchors.fill: parent;
29 source: artImage;
29 source: artImage;
30 sourceFillMode: UbuntuShape.PreserveAspectCrop;
30 sourceFillMode: UbuntuShape.PreserveAspectCrop;
31− radius: "medium";
31+ radius: "small";
32 aspect: UbuntuShape.Flat;
32 aspect: UbuntuShape.Flat;
33 }
33 }
34 width: image.status !== Image.Ready ? 0 : image.width;
34 width: image.status !== Image.Ready ? 0 : image.width;
@@ -62,7 +62,7 @@ Label {
62 visible: showHeader ;
62 visible: showHeader ;
63 width: undefined;
63 width: undefined;
64 text: root.title;
64 text: root.title;
65− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
65+ font.weight: Font.Normal;
66 horizontalAlignment: Text.AlignLeft;
66 horizontalAlignment: Text.AlignLeft;
67 }
67 }
68Label {
68Label {
tests/plugins/Dash/cardcreator/2.res+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
19 visible: status === Loader.Ready;
19 visible: status === Loader.Ready;
20 sourceComponent: UbuntuShape {
20 sourceComponent: UbuntuShape {
21 objectName: "background";
21 objectName: "background";
22− radius: "medium";
22+ radius: "small";
23 aspect: {
23 aspect: {
24 switch (root.backgroundShapeStyle) {
24 switch (root.backgroundShapeStyle) {
25 case "inset": return UbuntuShape.Inset;
25 case "inset": return UbuntuShape.Inset;
@@ -97,7 +97,7 @@ CroppedImageMinimumSourceSize {
97 visible: showHeader ;
97 visible: showHeader ;
98 width: undefined;
98 width: undefined;
99 text: root.title;
99 text: root.title;
100− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
100+ font.weight: Font.Normal;
101 horizontalAlignment: Text.AlignLeft;
101 horizontalAlignment: Text.AlignLeft;
102 }
102 }
103 ,Label {
103 ,Label {
tests/plugins/Dash/cardcreator/2.res.cardcreator+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
17 visible: status === Loader.Ready;
17 visible: status === Loader.Ready;
18 sourceComponent: UbuntuShape {
18 sourceComponent: UbuntuShape {
19 objectName: "background";
19 objectName: "background";
20− radius: "medium";
20+ radius: "small";
21 aspect: {
21 aspect: {
22 switch (root.backgroundShapeStyle) {
22 switch (root.backgroundShapeStyle) {
23 case "inset": return UbuntuShape.Inset;
23 case "inset": return UbuntuShape.Inset;
@@ -95,7 +95,7 @@ CroppedImageMinimumSourceSize {
95 visible: showHeader ;
95 visible: showHeader ;
96 width: undefined;
96 width: undefined;
97 text: root.title;
97 text: root.title;
98− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
98+ font.weight: Font.Normal;
99 horizontalAlignment: Text.AlignLeft;
99 horizontalAlignment: Text.AlignLeft;
100 }
100 }
101 ,Label {
101 ,Label {
tests/plugins/Dash/cardcreator/3.res+2−2
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -65,7 +65,7 @@ Label {
65 visible: showHeader ;
65 visible: showHeader ;
66 width: undefined;
66 width: undefined;
67 text: root.title;
67 text: root.title;
68− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
68+ font.weight: Font.Normal;
69 horizontalAlignment: Text.AlignLeft;
69 horizontalAlignment: Text.AlignLeft;
70 }
70 }
71Label {
71Label {
tests/plugins/Dash/cardcreator/3.res.cardcreator+2−2
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -61,7 +61,7 @@ Label {
61 visible: showHeader ;
61 visible: showHeader ;
62 width: undefined;
62 width: undefined;
63 text: root.title;
63 text: root.title;
64− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
64+ font.weight: Font.Normal;
65 horizontalAlignment: Text.AlignLeft;
65 horizontalAlignment: Text.AlignLeft;
66 }
66 }
67Label {
67Label {
tests/plugins/Dash/cardcreator/4.res+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -72,7 +72,7 @@ Label {
72 visible: showHeader ;
72 visible: showHeader ;
73 width: undefined;
73 width: undefined;
74 text: root.title;
74 text: root.title;
75− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
75+ font.weight: Font.Normal;
76 horizontalAlignment: Text.AlignLeft;
76 horizontalAlignment: Text.AlignLeft;
77 }
77 }
78,Label {
78,Label {
@@ -103,7 +103,7 @@ Loader {
103 sourceComponent: UbuntuShape {
103 sourceComponent: UbuntuShape {
104 objectName: "touchdown";
104 objectName: "touchdown";
105 anchors.fill: parent;
105 anchors.fill: parent;
106− radius: "medium";
106+ radius: "small";
107 borderSource: "radius_pressed.sci"
107 borderSource: "radius_pressed.sci"
108 }
108 }
109}
109}
tests/plugins/Dash/cardcreator/4.res.cardcreator+2−2
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -70,7 +70,7 @@ Label {
70 visible: showHeader ;
70 visible: showHeader ;
71 width: undefined;
71 width: undefined;
72 text: root.title;
72 text: root.title;
73− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
73+ font.weight: Font.Normal;
74 horizontalAlignment: Text.AlignLeft;
74 horizontalAlignment: Text.AlignLeft;
75 }
75 }
76,Label {
76,Label {
tests/plugins/Dash/cardcreator/5.res+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -51,7 +51,7 @@ Loader {
51 id: overlay;
51 id: overlay;
52 property real luminance: Style.luminance(overlayColor);
52 property real luminance: Style.luminance(overlayColor);
53 aspect: UbuntuShape.Flat;
53 aspect: UbuntuShape.Flat;
54− radius: "medium";
54+ radius: "small";
55 overlayColor: cardData && cardData["overlayColor"] || "#99000000";
55 overlayColor: cardData && cardData["overlayColor"] || "#99000000";
56 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
56 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
57 }
57 }
@@ -76,7 +76,7 @@ Label {
76 visible: showHeader && overlayLoader.active;
76 visible: showHeader && overlayLoader.active;
77 width: undefined;
77 width: undefined;
78 text: root.title;
78 text: root.title;
79− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
79+ font.weight: Font.Normal;
80 horizontalAlignment: Text.AlignLeft;
80 horizontalAlignment: Text.AlignLeft;
81 }
81 }
82Label {
82Label {
tests/plugins/Dash/cardcreator/5.res.cardcreator+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -48,7 +48,7 @@ Loader {
48 id: overlay;
48 id: overlay;
49 property real luminance: Style.luminance(overlayColor);
49 property real luminance: Style.luminance(overlayColor);
50 aspect: UbuntuShape.Flat;
50 aspect: UbuntuShape.Flat;
51− radius: "medium";
51+ radius: "small";
52 overlayColor: cardData && cardData["overlayColor"] || "#99000000";
52 overlayColor: cardData && cardData["overlayColor"] || "#99000000";
53 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
53 overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
54 }
54 }
@@ -73,7 +73,7 @@ Label {
73 visible: showHeader && overlayLoader.active;
73 visible: showHeader && overlayLoader.active;
74 width: undefined;
74 width: undefined;
75 text: root.title;
75 text: root.title;
76− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
76+ font.weight: Font.Normal;
77 horizontalAlignment: Text.AlignLeft;
77 horizontalAlignment: Text.AlignLeft;
78 }
78 }
79Label {
79Label {
tests/plugins/Dash/cardcreator/6.res+4−4
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
19 visible: status === Loader.Ready;
19 visible: status === Loader.Ready;
20 sourceComponent: UbuntuShape {
20 sourceComponent: UbuntuShape {
21 objectName: "background";
21 objectName: "background";
22− radius: "medium";
22+ radius: "small";
23 aspect: {
23 aspect: {
24 switch (root.backgroundShapeStyle) {
24 switch (root.backgroundShapeStyle) {
25 case "inset": return UbuntuShape.Inset;
25 case "inset": return UbuntuShape.Inset;
@@ -76,7 +76,7 @@ Item {
76 visible: showHeader ;
76 visible: showHeader ;
77 width: undefined;
77 width: undefined;
78 text: root.title;
78 text: root.title;
79− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
79+ font.weight: Font.Normal;
80 horizontalAlignment: Text.AlignLeft;
80 horizontalAlignment: Text.AlignLeft;
81 }
81 }
82,Label {
82,Label {
@@ -119,7 +119,7 @@ Loader {
119 sourceComponent: UbuntuShape {
119 sourceComponent: UbuntuShape {
120 objectName: "touchdown";
120 objectName: "touchdown";
121 anchors.fill: parent;
121 anchors.fill: parent;
122− radius: "medium";
122+ radius: "small";
123 borderSource: "radius_pressed.sci"
123 borderSource: "radius_pressed.sci"
124 }
124 }
125}
125}
tests/plugins/Dash/cardcreator/6.res.cardcreator+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
17 visible: status === Loader.Ready;
17 visible: status === Loader.Ready;
18 sourceComponent: UbuntuShape {
18 sourceComponent: UbuntuShape {
19 objectName: "background";
19 objectName: "background";
20− radius: "medium";
20+ radius: "small";
21 aspect: {
21 aspect: {
22 switch (root.backgroundShapeStyle) {
22 switch (root.backgroundShapeStyle) {
23 case "inset": return UbuntuShape.Inset;
23 case "inset": return UbuntuShape.Inset;
@@ -75,7 +75,7 @@ Item {
75 visible: showHeader ;
75 visible: showHeader ;
76 width: undefined;
76 width: undefined;
77 text: root.title;
77 text: root.title;
78− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
78+ font.weight: Font.Normal;
79 horizontalAlignment: Text.AlignLeft;
79 horizontalAlignment: Text.AlignLeft;
80 }
80 }
81,Label {
81,Label {
tests/plugins/Dash/cardcreator/6.tst+1−1
@@ -1,4 +1,4 @@
1template: {"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}
1template: {"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}
2components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"subtitle":{"field":"author"},"title":{"field":"title"},"emblem":{"field":"source"},"attributes":{}}
2components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"subtitle":{"field":"author"},"title":{"field":"title"},"emblem":{"field":"source"},"attributes":{}}
3−artShapeStyle: inset
3+artShapeStyle: flat
4result: 6.res
4result: 6.res
tests/plugins/Dash/cardcreator/7.res+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
19 visible: status === Loader.Ready;
19 visible: status === Loader.Ready;
20 sourceComponent: UbuntuShape {
20 sourceComponent: UbuntuShape {
21 objectName: "background";
21 objectName: "background";
22− radius: "medium";
22+ radius: "small";
23 aspect: {
23 aspect: {
24 switch (root.backgroundShapeStyle) {
24 switch (root.backgroundShapeStyle) {
25 case "inset": return UbuntuShape.Inset;
25 case "inset": return UbuntuShape.Inset;
@@ -98,7 +98,7 @@ CroppedImageMinimumSourceSize {
98 visible: showHeader ;
98 visible: showHeader ;
99 width: undefined;
99 width: undefined;
100 text: root.title;
100 text: root.title;
101− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
101+ font.weight: Font.Normal;
102 horizontalAlignment: Text.AlignLeft;
102 horizontalAlignment: Text.AlignLeft;
103 }
103 }
104,Label {
104,Label {
tests/plugins/Dash/cardcreator/7.res.cardcreator+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
17 visible: status === Loader.Ready;
17 visible: status === Loader.Ready;
18 sourceComponent: UbuntuShape {
18 sourceComponent: UbuntuShape {
19 objectName: "background";
19 objectName: "background";
20− radius: "medium";
20+ radius: "small";
21 aspect: {
21 aspect: {
22 switch (root.backgroundShapeStyle) {
22 switch (root.backgroundShapeStyle) {
23 case "inset": return UbuntuShape.Inset;
23 case "inset": return UbuntuShape.Inset;
@@ -96,7 +96,7 @@ CroppedImageMinimumSourceSize {
96 visible: showHeader ;
96 visible: showHeader ;
97 width: undefined;
97 width: undefined;
98 text: root.title;
98 text: root.title;
99− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
99+ font.weight: Font.Normal;
100 horizontalAlignment: Text.AlignLeft;
100 horizontalAlignment: Text.AlignLeft;
101 }
101 }
102,Label {
102,Label {
tests/plugins/Dash/cardcreator/8.res+4−4
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -19,7 +19,7 @@ Loader {
19 visible: status === Loader.Ready;
19 visible: status === Loader.Ready;
20 sourceComponent: UbuntuShape {
20 sourceComponent: UbuntuShape {
21 objectName: "background";
21 objectName: "background";
22− radius: "medium";
22+ radius: "small";
23 aspect: {
23 aspect: {
24 switch (root.backgroundShapeStyle) {
24 switch (root.backgroundShapeStyle) {
25 case "inset": return UbuntuShape.Inset;
25 case "inset": return UbuntuShape.Inset;
@@ -89,7 +89,7 @@ left: parent.left;
89 visible: showHeader ;
89 visible: showHeader ;
90 width: parent.width - x;
90 width: parent.width - x;
91 text: root.title;
91 text: root.title;
92− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
92+ font.weight: Font.Normal;
93 horizontalAlignment: Text.AlignLeft;
93 horizontalAlignment: Text.AlignLeft;
94 }
94 }
95
95
@@ -101,7 +101,7 @@ Loader {
101 sourceComponent: UbuntuShape {
101 sourceComponent: UbuntuShape {
102 objectName: "touchdown";
102 objectName: "touchdown";
103 anchors.fill: parent;
103 anchors.fill: parent;
104− radius: "medium";
104+ radius: "small";
105 borderSource: "radius_pressed.sci"
105 borderSource: "radius_pressed.sci"
106 }
106 }
107}
107}
tests/plugins/Dash/cardcreator/8.res.cardcreator+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -17,7 +17,7 @@ Loader {
17 visible: status === Loader.Ready;
17 visible: status === Loader.Ready;
18 sourceComponent: UbuntuShape {
18 sourceComponent: UbuntuShape {
19 objectName: "background";
19 objectName: "background";
20− radius: "medium";
20+ radius: "small";
21 aspect: {
21 aspect: {
22 switch (root.backgroundShapeStyle) {
22 switch (root.backgroundShapeStyle) {
23 case "inset": return UbuntuShape.Inset;
23 case "inset": return UbuntuShape.Inset;
@@ -87,7 +87,7 @@ left: parent.left;
87 visible: showHeader ;
87 visible: showHeader ;
88 width: parent.width - x;
88 width: parent.width - x;
89 text: root.title;
89 text: root.title;
90− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
90+ font.weight: Font.Normal;
91 horizontalAlignment: Text.AlignLeft;
91 horizontalAlignment: Text.AlignLeft;
92 }
92 }
93
93
tests/plugins/Dash/cardcreator/8.tst+1−1
@@ -1,4 +1,4 @@
1template: {"card-background":{"elements":["#E9E9E9","#E9AAE9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
1template: {"card-background":{"elements":["#E9E9E9","#E9AAE9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
2components: {"background":{"field":"background"},"mascot":{"field":"icon"},"title":{"field":"title"},"attributes":{}}
2components: {"background":{"field":"background"},"mascot":{"field":"icon"},"title":{"field":"title"},"attributes":{}}
3−artShapeStyle: inset
3+artShapeStyle: flat
4result: 8.res
4result: 8.res
tests/plugins/Dash/cardcreator/9.res+4−4
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -31,7 +31,7 @@ top: parent.top;
31 visible: showHeader ;
31 visible: showHeader ;
32 width: undefined;
32 width: undefined;
33 text: root.title;
33 text: root.title;
34− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
34+ font.weight: Font.Normal;
35 horizontalAlignment: Text.AlignLeft;
35 horizontalAlignment: Text.AlignLeft;
36 }
36 }
37Label {
37Label {
@@ -73,7 +73,7 @@ CardAudioProgress {
73 UbuntuShape {
73 UbuntuShape {
74 anchors.fill: parent;
74 anchors.fill: parent;
75 visible: parent.pressed;
75 visible: parent.pressed;
76− radius: "medium";
76+ radius: "small";
77 }
77 }
78 Rectangle {
78 Rectangle {
79 color: Qt.rgba(0, 0, 0, 0.5);
79 color: Qt.rgba(0, 0, 0, 0.5);
@@ -112,7 +112,7 @@ CardAudioProgress {
112 sourceComponent: UbuntuShape {
112 sourceComponent: UbuntuShape {
113 objectName: "touchdown";
113 objectName: "touchdown";
114 anchors.fill: parent;
114 anchors.fill: parent;
115− radius: "medium";
115+ radius: "small";
116 borderSource: "radius_pressed.sci"
116 borderSource: "radius_pressed.sci"
117 }
117 }
118}
118}
tests/plugins/Dash/cardcreator/9.res.cardcreator+3−3
@@ -1,7 +1,7 @@
1AbstractButton {
1AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4− property string backgroundShapeStyle: "inset";
4+ property string backgroundShapeStyle: "flat";
5 property real fontScale: 1.0;
5 property real fontScale: 1.0;
6 property var scopeStyle: null;
6 property var scopeStyle: null;
7 readonly property string title: cardData && cardData["title"] || "";
7 readonly property string title: cardData && cardData["title"] || "";
@@ -30,7 +30,7 @@ top: parent.top;
30 visible: showHeader ;
30 visible: showHeader ;
31 width: undefined;
31 width: undefined;
32 text: root.title;
32 text: root.title;
33− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
33+ font.weight: Font.Normal;
34 horizontalAlignment: Text.AlignLeft;
34 horizontalAlignment: Text.AlignLeft;
35 }
35 }
36Label {
36Label {
@@ -72,7 +72,7 @@ CardAudioProgress {
72 UbuntuShape {
72 UbuntuShape {
73 anchors.fill: parent;
73 anchors.fill: parent;
74 visible: parent.pressed;
74 visible: parent.pressed;
75− radius: "medium";
75+ radius: "small";
76 }
76 }
77 Rectangle {
77 Rectangle {
78 color: Qt.rgba(0, 0, 0, 0.5);
78 color: Qt.rgba(0, 0, 0, 0.5);
tests/plugins/Dash/cardcreator/9.tst+1−1
@@ -1,4 +1,4 @@
1template: {"card-layout":"horizontal","card-size":"medium","category-layout":"grid","collapsed-rows":2,"quick-preview-type": "audio"}
1template: {"card-layout":"horizontal","card-size":"medium","category-layout":"grid","collapsed-rows":2,"quick-preview-type": "audio"}
2components: {"art":{"aspect-ratio":1},"subtitle":{"field":"author"},"title":{"field":"title"}, "quickPreviewData": "quickPreviewData"}
2components: {"art":{"aspect-ratio":1},"subtitle":{"field":"author"},"title":{"field":"title"}, "quickPreviewData": "quickPreviewData"}
3−artShapeStyle: inset
3+artShapeStyle: flat
4result: 9.res
4result: 9.res
tests/qmltests/Dash/tst_Card.qml−15
@@ -529,21 +529,6 @@ Rectangle {
529 compare(mascotImage.source, Qt.resolvedUrl("artwork/checkers.png"));
529 compare(mascotImage.source, Qt.resolvedUrl("artwork/checkers.png"));
530 }
530 }
531
531
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−
547 function test_fontColor_data() {
532 function test_fontColor_data() {
548 return [
533 return [
549 { tag: "#ffffff", dark: true },
534 { tag: "#ffffff", dark: true },