on xenial help sign in
Remove artShapeSize from non cardtool cards
e9f3de1Albert Astals Cid
plugins/Dash/CardCreator.js+6−2
@@ -514,7 +514,9 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
514 }
514 }
515
515
516 if (hasArt) {
516 if (hasArt) {
517+ if (isCardTool) {
517− code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
518+ code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
519+ }
518
520
519 var artShapeAspect;
521 var artShapeAspect;
520 if (isCardTool) {
522 if (isCardTool) {
@@ -582,7 +584,9 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
582 .arg(fallbackStatusCode)
584 .arg(fallbackStatusCode)
583 .arg(fallbackURICode);
585 .arg(fallbackURICode);
584 } else {
586 } else {
587+ if (isCardTool) {
585− code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
588+ code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
589+ }
586 }
590 }
587
591
588 if (headerAsOverlay) {
592 if (headerAsOverlay) {
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);
15Item {
14Item {
16 id: artShapeHolder;
15 id: artShapeHolder;
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);
53Item {
52Item {
54 id: artShapeHolder;
53 id: artShapeHolder;
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);
15Item {
14Item {
16 id: artShapeHolder;
15 id: artShapeHolder;
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);
15Item {
14Item {
16 id: artShapeHolder;
15 id: artShapeHolder;
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);
15Item {
14Item {
16 id: artShapeHolder;
15 id: artShapeHolder;
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;