on xenial help sign in
Fix cardcreator test
commit3c833c4b1862dcf4e3579b01e7f53ffefdb2633b authorAndrea Cimitan <andrea.cimitan@gmail.com> dateThu 30 Jul 2015, 19:35 (11 years ago) parenta61da40
8 files changed+83−32
tests/plugins/Dash/cardcreator/1.res+24−7 tests/plugins/Dash/cardcreator/2.res+1−1 tests/plugins/Dash/cardcreator/3.res+24−7 tests/plugins/Dash/cardcreator/4.res+1−1 tests/plugins/Dash/cardcreator/5.res+24−7 tests/plugins/Dash/cardcreator/6.res+1−1 tests/plugins/Dash/cardcreator/7.res+1−1 tests/plugins/Dash/cardcreator/8.res+7−7
tests/plugins/Dash/cardcreator/1.res+24−7
@@ -40,13 +40,30 @@ Item {
4040 height: 1;
4141 hideSource: doShapeItem;
4242 }
43− UbuntuShape {
44− id: artShapeShape;
45− source: artShapeSource;
43+ Loader {
4644 anchors.fill: parent;
47− visible: doShapeItem;
48− radius: "medium";
49− aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
45+ visible: artShape.doShapeItem;
46+ sourceComponent: root.artShapeStyle === "icon" ? artShapeIconComponent : artShapeShapeComponent;
47+ Component {
48+ id: artShapeShapeComponent;
49+ UbuntuShape {
50+ source: artShapeSource;
51+ sourceFillMode: UbuntuShape.PreserveAspectCrop;
52+ radius: "medium";
53+ aspect: {
54+ switch (root.artShapeStyle) {
55+ case "inset": return UbuntuShape.Inset;
56+ case "shadow": return UbuntuShape.DropShadow;
57+ default:
58+ case "flat": return UbuntuShape.Flat;
59+ }
60+ }
61+ }
62+ }
63+ Component {
64+ id: artShapeIconComponent;
65+ UbuntuShapeIcon { source: artShapeSource; }
66+ }
5067 }
5168 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
5269 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
@@ -97,7 +114,7 @@ UbuntuShape {
97114 id: touchdown;
98115 objectName: "touchdown";
99116 anchors { fill: artShapeHolder }
100− visible: root.pressed;
117+ visible: root.artShapeStyle != "shadow" && root.artShapeStyle != "icon" && root.pressed;
101118 radius: "medium";
102119 borderSource: "radius_pressed.sci"
103120}
tests/plugins/Dash/cardcreator/2.res+1−1
@@ -124,7 +124,7 @@ UbuntuShape {
124124 id: touchdown;
125125 objectName: "touchdown";
126126 anchors { fill: backgroundLoader }
127− visible: root.pressed;
127+ visible: root.artShapeStyle != "shadow" && root.artShapeStyle != "icon" && root.pressed;
128128 radius: "medium";
129129 borderSource: "radius_pressed.sci"
130130}
tests/plugins/Dash/cardcreator/3.res+24−7
@@ -40,13 +40,30 @@ Item {
4040 height: 1;
4141 hideSource: doShapeItem;
4242 }
43− UbuntuShape {
44− id: artShapeShape;
45− source: artShapeSource;
43+ Loader {
4644 anchors.fill: parent;
47− visible: doShapeItem;
48− radius: "medium";
49− aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
45+ visible: artShape.doShapeItem;
46+ sourceComponent: root.artShapeStyle === "icon" ? artShapeIconComponent : artShapeShapeComponent;
47+ Component {
48+ id: artShapeShapeComponent;
49+ UbuntuShape {
50+ source: artShapeSource;
51+ sourceFillMode: UbuntuShape.PreserveAspectCrop;
52+ radius: "medium";
53+ aspect: {
54+ switch (root.artShapeStyle) {
55+ case "inset": return UbuntuShape.Inset;
56+ case "shadow": return UbuntuShape.DropShadow;
57+ default:
58+ case "flat": return UbuntuShape.Flat;
59+ }
60+ }
61+ }
62+ }
63+ Component {
64+ id: artShapeIconComponent;
65+ UbuntuShapeIcon { source: artShapeSource; }
66+ }
5067 }
5168 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
5269 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
@@ -115,7 +132,7 @@ UbuntuShape {
115132 id: touchdown;
116133 objectName: "touchdown";
117134 anchors { fill: artShapeHolder }
118− visible: root.pressed;
135+ visible: root.artShapeStyle != "shadow" && root.artShapeStyle != "icon" && root.pressed;
119136 radius: "medium";
120137 borderSource: "radius_pressed.sci"
121138}
tests/plugins/Dash/cardcreator/4.res+1−1
@@ -105,7 +105,7 @@ UbuntuShape {
105105 id: touchdown;
106106 objectName: "touchdown";
107107 anchors { fill: root }
108− visible: root.pressed;
108+ visible: root.artShapeStyle != "shadow" && root.artShapeStyle != "icon" && root.pressed;
109109 radius: "medium";
110110 borderSource: "radius_pressed.sci"
111111}
tests/plugins/Dash/cardcreator/5.res+24−7
@@ -40,13 +40,30 @@ Item {
4040 height: 1;
4141 hideSource: doShapeItem;
4242 }
43− UbuntuShape {
44− id: artShapeShape;
45− source: artShapeSource;
43+ Loader {
4644 anchors.fill: parent;
47− visible: doShapeItem;
48− radius: "medium";
49− aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
45+ visible: artShape.doShapeItem;
46+ sourceComponent: root.artShapeStyle === "icon" ? artShapeIconComponent : artShapeShapeComponent;
47+ Component {
48+ id: artShapeShapeComponent;
49+ UbuntuShape {
50+ source: artShapeSource;
51+ sourceFillMode: UbuntuShape.PreserveAspectCrop;
52+ radius: "medium";
53+ aspect: {
54+ switch (root.artShapeStyle) {
55+ case "inset": return UbuntuShape.Inset;
56+ case "shadow": return UbuntuShape.DropShadow;
57+ default:
58+ case "flat": return UbuntuShape.Flat;
59+ }
60+ }
61+ }
62+ }
63+ Component {
64+ id: artShapeIconComponent;
65+ UbuntuShapeIcon { source: artShapeSource; }
66+ }
5067 }
5168 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
5269 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
@@ -134,7 +151,7 @@ UbuntuShape {
134151 id: touchdown;
135152 objectName: "touchdown";
136153 anchors { fill: artShapeHolder }
137− visible: root.pressed;
154+ visible: root.artShapeStyle != "shadow" && root.artShapeStyle != "icon" && root.pressed;
138155 radius: "medium";
139156 borderSource: "radius_pressed.sci"
140157}
tests/plugins/Dash/cardcreator/6.res+1−1
@@ -113,7 +113,7 @@ UbuntuShape {
113113 id: touchdown;
114114 objectName: "touchdown";
115115 anchors { fill: backgroundLoader }
116− visible: root.pressed;
116+ visible: root.artShapeStyle != "shadow" && root.artShapeStyle != "icon" && root.pressed;
117117 radius: "medium";
118118 borderSource: "radius_pressed.sci"
119119}
tests/plugins/Dash/cardcreator/7.res+1−1
@@ -137,7 +137,7 @@ UbuntuShape {
137137 id: touchdown;
138138 objectName: "touchdown";
139139 anchors { fill: backgroundLoader }
140− visible: root.pressed;
140+ visible: root.artShapeStyle != "shadow" && root.artShapeStyle != "icon" && root.pressed;
141141 radius: "medium";
142142 borderSource: "radius_pressed.sci"
143143}
tests/plugins/Dash/cardcreator/8.res+7−7
@@ -92,12 +92,12 @@ left: parent.left;
9292 ]
9393 }
9494UbuntuShape {
95− id: touchdown;
96− objectName: "touchdown";
97− anchors { fill: backgroundLoader }
98− visible: root.pressed;
99− radius: "medium";
100− borderSource: "radius_pressed.sci"
101− }
95+ id: touchdown;
96+ objectName: "touchdown";
97+ anchors { fill: backgroundLoader }
98+ visible: root.artShapeStyle != "shadow" && root.artShapeStyle != "icon" && root.pressed;
99+ radius: "medium";
100+ borderSource: "radius_pressed.sci"
101+}
102102implicitHeight: row.y + row.height + units.gu(1);
103103}