on xenial help sign in
Remove artShapeSize from non cardtool cards
8057d53Albert Astals Cid
plugins/Dash/CardCreator.js+3−3
@@ -508,10 +508,10 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
508 }
508 }
509
509
510 if (hasArt) {
510 if (hasArt) {
511− code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
512−
513 var artShapeAspect;
511 var artShapeAspect;
514 if (isCardTool) {
512 if (isCardTool) {
513+ code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
514+
515 var artShapeAspect = components["art"] && components["art"]["aspect-ratio"] || 1;
515 var artShapeAspect = components["art"] && components["art"]["aspect-ratio"] || 1;
516 if (isNaN(artShapeAspect)) {
516 if (isNaN(artShapeAspect)) {
517 artShapeAspect = 1;
517 artShapeAspect = 1;
@@ -575,7 +575,7 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
575 .arg(artShapeHolderShapeCode)
575 .arg(artShapeHolderShapeCode)
576 .arg(fallbackStatusCode)
576 .arg(fallbackStatusCode)
577 .arg(fallbackURICode);
577 .arg(fallbackURICode);
578− } else {
578+ } else if (isCardTool) {
579 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
579 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
580 }
580 }
581
581
tests/plugins/Dash/cardcreator/1.res−1
@@ -11,7 +11,6 @@ AbstractButton {
11 property int fixedHeaderHeight: -1;
11 property int fixedHeaderHeight: -1;
12 property size fixedArtShapeSize: Qt.size(-1, -1);
12 property size fixedArtShapeSize: Qt.size(-1, -1);
13signal action(var actionId);
13signal action(var actionId);
14−readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15Loader {
14Loader {
16 id: artShapeLoader;
15 id: artShapeLoader;
17 height: root.fixedArtShapeSize.height;
16 height: root.fixedArtShapeSize.height;
tests/plugins/Dash/cardcreator/10.res−1
@@ -49,7 +49,6 @@ Loader {
49 }
49 }
50 }
50 }
51 }
51 }
52−readonly property size artShapeSize: Qt.size(-1, -1);
53readonly property int headerHeight: row.height;
52readonly property int headerHeight: row.height;
54Row {
53Row {
55 id: row;
54 id: row;
tests/plugins/Dash/cardcreator/11.res−1
@@ -49,7 +49,6 @@ Loader {
49 }
49 }
50 }
50 }
51 }
51 }
52−readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
53Loader {
52Loader {
54 id: artShapeLoader;
53 id: artShapeLoader;
55 height: root.fixedArtShapeSize.height;
54 height: root.fixedArtShapeSize.height;
tests/plugins/Dash/cardcreator/12.res−1
@@ -11,7 +11,6 @@ AbstractButton {
11 property int fixedHeaderHeight: -1;
11 property int fixedHeaderHeight: -1;
12 property size fixedArtShapeSize: Qt.size(-1, -1);
12 property size fixedArtShapeSize: Qt.size(-1, -1);
13signal action(var actionId);
13signal action(var actionId);
14−readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15Loader {
14Loader {
16 id: artShapeLoader;
15 id: artShapeLoader;
17 height: root.fixedArtShapeSize.height;
16 height: root.fixedArtShapeSize.height;
tests/plugins/Dash/cardcreator/2.res−1
@@ -49,7 +49,6 @@ Loader {
49 }
49 }
50 }
50 }
51 }
51 }
52−readonly property size artShapeSize: Qt.size(-1, -1);
53readonly property int headerHeight: row.height;
52readonly property int headerHeight: row.height;
54Row {
53Row {
55 id: row;
54 id: row;
tests/plugins/Dash/cardcreator/3.res−1
@@ -11,7 +11,6 @@ AbstractButton {
11 property int fixedHeaderHeight: -1;
11 property int fixedHeaderHeight: -1;
12 property size fixedArtShapeSize: Qt.size(-1, -1);
12 property size fixedArtShapeSize: Qt.size(-1, -1);
13signal action(var actionId);
13signal action(var actionId);
14−readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15Loader {
14Loader {
16 id: artShapeLoader;
15 id: artShapeLoader;
17 height: root.fixedArtShapeSize.height;
16 height: root.fixedArtShapeSize.height;
tests/plugins/Dash/cardcreator/4.res−1
@@ -11,7 +11,6 @@ AbstractButton {
11 property int fixedHeaderHeight: -1;
11 property int fixedHeaderHeight: -1;
12 property size fixedArtShapeSize: Qt.size(-1, -1);
12 property size fixedArtShapeSize: Qt.size(-1, -1);
13signal action(var actionId);
13signal action(var actionId);
14−readonly property size artShapeSize: Qt.size(-1, -1);
15readonly property int headerHeight: row.height;
14readonly property int headerHeight: row.height;
16Row {
15Row {
17 id: row;
16 id: row;
tests/plugins/Dash/cardcreator/5.res−1
@@ -11,7 +11,6 @@ AbstractButton {
11 property int fixedHeaderHeight: -1;
11 property int fixedHeaderHeight: -1;
12 property size fixedArtShapeSize: Qt.size(-1, -1);
12 property size fixedArtShapeSize: Qt.size(-1, -1);
13signal action(var actionId);
13signal action(var actionId);
14−readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15Loader {
14Loader {
16 id: artShapeLoader;
15 id: artShapeLoader;
17 height: root.fixedArtShapeSize.height;
16 height: root.fixedArtShapeSize.height;
tests/plugins/Dash/cardcreator/6.res−1
@@ -49,7 +49,6 @@ Loader {
49 }
49 }
50 }
50 }
51 }
51 }
52−readonly property size artShapeSize: Qt.size(-1, -1);
53readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
52readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
54Item {
53Item {
55 id: headerTitleContainer;
54 id: headerTitleContainer;
tests/plugins/Dash/cardcreator/7.res−1
@@ -49,7 +49,6 @@ Loader {
49 }
49 }
50 }
50 }
51 }
51 }
52−readonly property size artShapeSize: Qt.size(-1, -1);
53readonly property int headerHeight: row.height;
52readonly property int headerHeight: row.height;
54Row {
53Row {
55 id: row;
54 id: row;
tests/plugins/Dash/cardcreator/8.res−1
@@ -49,7 +49,6 @@ Loader {
49 }
49 }
50 }
50 }
51 }
51 }
52−readonly property size artShapeSize: Qt.size(-1, -1);
53readonly property int headerHeight: row.height;
52readonly property int headerHeight: row.height;
54Row {
53Row {
55 id: row;
54 id: row;
tests/plugins/Dash/cardcreator/9.res−1
@@ -11,7 +11,6 @@ AbstractButton {
11 property int fixedHeaderHeight: -1;
11 property int fixedHeaderHeight: -1;
12 property size fixedArtShapeSize: Qt.size(-1, -1);
12 property size fixedArtShapeSize: Qt.size(-1, -1);
13signal action(var actionId);
13signal action(var actionId);
14−readonly property size artShapeSize: Qt.size(-1, -1);
15readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin;
14readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin;
16Label {
15Label {
17 id: titleLabel;
16 id: titleLabel;