on xenial help sign in
Flat cards
0220465Andrea Cimitan
plugins/Dash/CardCreator.js+1−1
@@ -439,7 +439,7 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
439 code = 'AbstractButton { \n\
439 code = 'AbstractButton { \n\
440 id: root; \n\
440 id: root; \n\
441 property var cardData; \n\
441 property var cardData; \n\
442− property string backgroundShapeStyle: "inset"; \n\
442+ property string backgroundShapeStyle: "flat"; \n\
443 property real fontScale: 1.0; \n\
443 property real fontScale: 1.0; \n\
444 property var scopeStyle: null; \n\
444 property var scopeStyle: null; \n\
445 readonly property string title: cardData && cardData["title"] || ""; \n\
445 readonly property string title: cardData && cardData["title"] || ""; \n\
qml/Dash/CardGrid.qml+1−1
@@ -25,7 +25,7 @@ DashRenderer {
25 if (!cardTool || !cardTool.template || typeof cardTool.template["collapsed-rows"] != "number") return 2;
25 if (!cardTool || !cardTool.template || typeof cardTool.template["collapsed-rows"] != "number") return 2;
26 return cardTool.template["collapsed-rows"];
26 return cardTool.template["collapsed-rows"];
27 }
27 }
28− property string backgroundShapeStyle: "inset";
28+ property string backgroundShapeStyle: "flat";
29 property alias minimumHorizontalSpacing: grid.minimumHorizontalSpacing
29 property alias minimumHorizontalSpacing: grid.minimumHorizontalSpacing
30
30
31 expandedHeight: grid.totalContentHeight
31 expandedHeight: grid.totalContentHeight
qml/Dash/CardTool.qml+1−1
@@ -69,7 +69,7 @@ Item {
69
69
70
70
71 // Not readonly because gets overwritten from GenericScopeView in some cases
71 // Not readonly because gets overwritten from GenericScopeView in some cases
72− property string artShapeStyle: categoryLayout === "carousel" ? "shadow" : "inset"
72+ property string artShapeStyle: categoryLayout === "carousel" ? "shadow" : "flat"
73
73
74 // FIXME ? This seems like it should not be needed, but on Qt 5.4 + phone
74 // FIXME ? This seems like it should not be needed, but on Qt 5.4 + phone
75 // we are doing unneeded calls to getCardComponent with artShapeStyle and categoryLayout being empty
75 // we are doing unneeded calls to getCardComponent with artShapeStyle and categoryLayout being empty
tests/plugins/Dash/cardcreator/1.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"] || "";
@@ -32,7 +32,7 @@ Loader {
32 source: artImage;
32 source: artImage;
33 sourceFillMode: UbuntuShape.PreserveAspectCrop;
33 sourceFillMode: UbuntuShape.PreserveAspectCrop;
34 radius: "medium";
34 radius: "medium";
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;
tests/plugins/Dash/cardcreator/1.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"] || "";
@@ -29,7 +29,7 @@ Loader {
29 source: artImage;
29 source: artImage;
30 sourceFillMode: UbuntuShape.PreserveAspectCrop;
30 sourceFillMode: UbuntuShape.PreserveAspectCrop;
31 radius: "medium";
31 radius: "medium";
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;
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+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/10.res.cardcreator+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/11.res+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/11.res.cardcreator+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/12.res+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/12.res.cardcreator+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/2.res+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/2.res.cardcreator+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/3.res+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/3.res.cardcreator+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/4.res+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/4.res.cardcreator+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/5.res+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/5.res.cardcreator+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/6.res+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/6.res.cardcreator+1−1
@@ -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"] || "";
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+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/7.res.cardcreator+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/8.res+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/8.res.cardcreator+1−1
@@ -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"] || "";
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+1−1
@@ -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"] || "";
tests/plugins/Dash/cardcreator/9.res.cardcreator+1−1
@@ -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"] || "";
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