Merge lp:~aacid/unity8/noFixedArtShapeSizeForCardToolCard into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Andrea Cimitan
Approved revision: 2219
Merged at revision: 2454
Proposed branch: lp:~aacid/unity8/noFixedArtShapeSizeForCardToolCard
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/optimize_card_attribute_creation
Diff against target: 665 lines (+130/-145)
25 files modified
plugins/Dash/CardCreator.js (+59/-12)
tests/plugins/Dash/cardcreator/1.res (+4/-4)
tests/plugins/Dash/cardcreator/1.res.cardcreator (+5/-16)
tests/plugins/Dash/cardcreator/10.res (+4/-4)
tests/plugins/Dash/cardcreator/10.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/11.res (+4/-4)
tests/plugins/Dash/cardcreator/11.res.cardcreator (+5/-16)
tests/plugins/Dash/cardcreator/12.res (+4/-4)
tests/plugins/Dash/cardcreator/12.res.cardcreator (+5/-16)
tests/plugins/Dash/cardcreator/2.res (+4/-4)
tests/plugins/Dash/cardcreator/2.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/3.res (+4/-4)
tests/plugins/Dash/cardcreator/3.res.cardcreator (+5/-16)
tests/plugins/Dash/cardcreator/4.res (+4/-4)
tests/plugins/Dash/cardcreator/4.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/5.res (+4/-4)
tests/plugins/Dash/cardcreator/5.res.cardcreator (+5/-16)
tests/plugins/Dash/cardcreator/6.res (+2/-2)
tests/plugins/Dash/cardcreator/6.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/7.res (+4/-4)
tests/plugins/Dash/cardcreator/7.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/8.res (+4/-4)
tests/plugins/Dash/cardcreator/8.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/9.res (+4/-4)
tests/plugins/Dash/cardcreator/9.res.cardcreator (+0/-1)
To merge this branch: bzr merge lp:~aacid/unity8/noFixedArtShapeSizeForCardToolCard
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Andrea Cimitan (community) Approve
Review via email: mp+295424@code.launchpad.net

This proposal supersedes a proposal from 2016-05-20.

Commit message

Split artShape code for cardTool card and regular card

The cardTool card never has a fixedArtShapeSize so it does not need all the code to take it into account

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
Prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2218
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1267/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1709
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1659
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1659
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1652/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1652
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1652/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1652/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1652
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1652/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1652/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1652
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1652/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1267/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2221
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1271/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/805
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/805
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1713
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1663
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1663
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1656/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1271/rebuild

review: Needs Fixing (continuous-integration)
2219. By Albert Astals Cid

Merge lp:~aacid/unity8/optimize_card_attribute_creation

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2221
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1272/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/806
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/806
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1714
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1664
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1664
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1657
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1657/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1657
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1657/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1657
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1657/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1657
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1657/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1657
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1657/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1657
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1657/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1272/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2219
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1295/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/822
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/822
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/822
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1738
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1686
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1686
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1686
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1679/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1295/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

Green light!

 * Did you perform an exploratory manual test run of the code change and any related functionality?
yes
 * Did CI run pass? If not, please explain why.
y

review: Approve
2220. By Albert Astals Cid

Merge

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2219
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1345/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/1783
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/881
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/881
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/881
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1814
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1760
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1760
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1760
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1751/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1751/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1751/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1751/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1751/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1751/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1751/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1751/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1751
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1751/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1345/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Dash/CardCreator.js'
--- plugins/Dash/CardCreator.js 2016-05-09 08:55:24 +0000
+++ plugins/Dash/CardCreator.js 2016-06-02 08:10:42 +0000
@@ -129,6 +129,51 @@
129 } \n\129 } \n\
130 }\n';130 }\n';
131131
132// %1 is used as anchors of artShapeHolder
133// %2 is used as image width
134// %3 is used as image height
135// %4 is whether the image should be visible
136// %5 is used as aspect ratio
137// %6 is whether the loader should be asynchronous or not
138// %7 is the shape code we want to use
139// %8 is injected as code to artImage
140// %9 is used as image fallback
141var kArtShapeHolderCodeCardToolCard = 'Item { \n\
142 id: artShapeHolder; \n\
143 height: artShapeLoader.height; \n\
144 width: artShapeLoader.width; \n\
145 anchors { %1 } \n\
146 Loader { \n\
147 id: artShapeLoader; \n\
148 objectName: "artShapeLoader"; \n\
149 readonly property string cardArt: cardData && cardData["art"] || %9; \n\
150 onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
151 active: cardArt != ""; \n\
152 asynchronous: %6; \n\
153 visible: status == Loader.Ready; \n\
154 sourceComponent: Item { \n\
155 id: artShape; \n\
156 objectName: "artShape"; \n\
157 visible: image.status == Image.Ready; \n\
158 readonly property alias image: artImage; \n\
159 %7 \n\
160 readonly property real aspect: %5; \n\
161 width: image.status !== Image.Ready ? 0 : image.width; \n\
162 height: image.status !== Image.Ready ? 0 : image.height; \n\
163 CroppedImageMinimumSourceSize { \n\
164 id: artImage; \n\
165 objectName: "artImage"; \n\
166 source: artShapeLoader.cardArt; \n\
167 asynchronous: %6; \n\
168 visible: %4; \n\
169 width: %2; \n\
170 height: %3; \n\
171 %8 \n\
172 } \n\
173 } \n\
174 } \n\
175 }\n';
176
132// %1 is anchors.fill177// %1 is anchors.fill
133// %2 is width178// %2 is width
134// %3 is height179// %3 is height
@@ -416,15 +461,16 @@
416 property string backgroundShapeStyle: "inset"; \n\461 property string backgroundShapeStyle: "inset"; \n\
417 property real fontScale: 1.0; \n\462 property real fontScale: 1.0; \n\
418 property var scopeStyle: null; \n\463 property var scopeStyle: null; \n\
419 %2\
420 property size fixedArtShapeSize: Qt.size(-1, -1); \n\
421 readonly property string title: cardData && cardData["title"] || ""; \n\464 readonly property string title: cardData && cardData["title"] || ""; \n\
422 property bool showHeader: true; \n\465 property bool showHeader: true; \n\
423 implicitWidth: childrenRect.width; \n\466 implicitWidth: childrenRect.width; \n\
424 enabled: %1; \n\467 enabled: %1; \n\
425 \n'.arg(templateInteractive);468 \n'.arg(templateInteractive);
426469
427 code = code.arg(isCardTool ? "" : "property int fixedHeaderHeight: -1; \n");470 if (!isCardTool) {
471 code += "property int fixedHeaderHeight: -1; \n\
472 property size fixedArtShapeSize: Qt.size(-1, -1); \n";
473 }
428474
429 var hasArt = components["art"] && components["art"]["field"] || false;475 var hasArt = components["art"] && components["art"]["field"] || false;
430 var hasSummary = components["summary"] || false;476 var hasSummary = components["summary"] || false;
@@ -533,15 +579,16 @@
533 } else {579 } else {
534 artShapeHolderShapeCode = "";580 artShapeHolderShapeCode = "";
535 }581 }
536 code += kArtShapeHolderCode.arg(artAnchors)582 var artShapeHolderCode = isCardTool ? kArtShapeHolderCodeCardToolCard : kArtShapeHolderCode;
537 .arg(widthCode)583 code += artShapeHolderCode.arg(artAnchors)
538 .arg(heightCode)584 .arg(widthCode)
539 .arg(isConciergeMode ? "true" : "false")585 .arg(heightCode)
540 .arg(aspectRatio)586 .arg(isConciergeMode ? "true" : "false")
541 .arg(asynchronous)587 .arg(aspectRatio)
542 .arg(artShapeHolderShapeCode)588 .arg(asynchronous)
543 .arg(fallbackStatusCode)589 .arg(artShapeHolderShapeCode)
544 .arg(fallbackURICode);590 .arg(fallbackStatusCode)
591 .arg(fallbackURICode);
545 } else {592 } else {
546 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'593 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
547 }594 }
548595
=== modified file 'tests/plugins/Dash/cardcreator/1.res'
--- tests/plugins/Dash/cardcreator/1.res 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/1.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);14readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15Item { 15Item {
1616
=== modified file 'tests/plugins/Dash/cardcreator/1.res.cardcreator'
--- tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
@@ -13,8 +12,8 @@
13readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);12readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
14Item { 13Item {
15 id: artShapeHolder; 14 id: artShapeHolder;
16 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; 15 height: artShapeLoader.height;
17 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; 16 width: artShapeLoader.width;
18 anchors { horizontalCenter: parent.horizontalCenter; } 17 anchors { horizontalCenter: parent.horizontalCenter; }
19 Loader { 18 Loader {
20 id: artShapeLoader; 19 id: artShapeLoader;
@@ -36,19 +35,9 @@
36 radius: "medium";35 radius: "medium";
37 aspect: UbuntuShape.Inset;36 aspect: UbuntuShape.Inset;
38 }37 }
39 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;38 readonly property real aspect: 1.6;
40 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1.6;39 width: image.status !== Image.Ready ? 0 : image.width;
41 Component.onCompleted: { updateWidthHeightBindings(); }40 height: image.status !== Image.Ready ? 0 : image.height;
42 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
43 function updateWidthHeightBindings() {
44 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
45 width = root.fixedArtShapeSize.width;
46 height = root.fixedArtShapeSize.height;
47 } else {
48 width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
49 height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
50 }
51 }
52 CroppedImageMinimumSourceSize {41 CroppedImageMinimumSourceSize {
53 id: artImage;42 id: artImage;
54 objectName: "artImage"; 43 objectName: "artImage";
5544
=== modified file 'tests/plugins/Dash/cardcreator/10.res'
--- tests/plugins/Dash/cardcreator/10.res 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/10.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14Loader {14Loader {
15 id: backgroundLoader; 15 id: backgroundLoader;
1616
=== modified file 'tests/plugins/Dash/cardcreator/10.res.cardcreator'
--- tests/plugins/Dash/cardcreator/10.res.cardcreator 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/10.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
1110
=== modified file 'tests/plugins/Dash/cardcreator/11.res'
--- tests/plugins/Dash/cardcreator/11.res 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/11.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14Loader {14Loader {
15 id: backgroundLoader; 15 id: backgroundLoader;
1616
=== modified file 'tests/plugins/Dash/cardcreator/11.res.cardcreator'
--- tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
@@ -51,8 +50,8 @@
51readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);50readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
52Item { 51Item {
53 id: artShapeHolder; 52 id: artShapeHolder;
54 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; 53 height: artShapeLoader.height;
55 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; 54 width: artShapeLoader.width;
56 anchors { horizontalCenter: parent.horizontalCenter; } 55 anchors { horizontalCenter: parent.horizontalCenter; }
57 Loader { 56 Loader {
58 id: artShapeLoader; 57 id: artShapeLoader;
@@ -74,19 +73,9 @@
74 radius: "medium";73 radius: "medium";
75 aspect: UbuntuShape.Flat;74 aspect: UbuntuShape.Flat;
76 }75 }
77 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; 76 readonly property real aspect: 1;
78 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;77 width: image.status !== Image.Ready ? 0 : image.width;
79 Component.onCompleted: { updateWidthHeightBindings(); } 78 height: image.status !== Image.Ready ? 0 : image.height;
80 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
81 function updateWidthHeightBindings() {
82 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
83 width = root.fixedArtShapeSize.width;
84 height = root.fixedArtShapeSize.height;
85 } else {
86 width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
87 height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
88 }
89 }
90 CroppedImageMinimumSourceSize { 79 CroppedImageMinimumSourceSize {
91 id: artImage; 80 id: artImage;
92 objectName: "artImage"; 81 objectName: "artImage";
9382
=== modified file 'tests/plugins/Dash/cardcreator/12.res'
--- tests/plugins/Dash/cardcreator/12.res 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/12.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);14readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15Item { 15Item {
1616
=== modified file 'tests/plugins/Dash/cardcreator/12.res.cardcreator'
--- tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
@@ -13,8 +12,8 @@
13readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);12readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
14Item { 13Item {
15 id: artShapeHolder; 14 id: artShapeHolder;
16 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; 15 height: artShapeLoader.height;
17 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; 16 width: artShapeLoader.width;
18 anchors { horizontalCenter: parent.horizontalCenter; } 17 anchors { horizontalCenter: parent.horizontalCenter; }
19 Loader {18 Loader {
20 id: artShapeLoader; 19 id: artShapeLoader;
@@ -36,19 +35,9 @@
36 radius: "medium";35 radius: "medium";
37 aspect: UbuntuShape.Flat;36 aspect: UbuntuShape.Flat;
38 }37 }
39 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;38 readonly property real aspect: 0.75;
40 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75;39 width: image.status !== Image.Ready ? 0 : image.width;
41 Component.onCompleted: { updateWidthHeightBindings(); }40 height: image.status !== Image.Ready ? 0 : image.height;
42 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
43 function updateWidthHeightBindings() {
44 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
45 width = root.fixedArtShapeSize.width;
46 height = root.fixedArtShapeSize.height;
47 } else {
48 width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
49 height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
50 }
51 }
52 CroppedImageMinimumSourceSize {41 CroppedImageMinimumSourceSize {
53 id: artImage;42 id: artImage;
54 objectName: "artImage";43 objectName: "artImage";
5544
=== modified file 'tests/plugins/Dash/cardcreator/2.res'
--- tests/plugins/Dash/cardcreator/2.res 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/2.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14Loader {14Loader {
15 id: backgroundLoader; 15 id: backgroundLoader;
1616
=== modified file 'tests/plugins/Dash/cardcreator/2.res.cardcreator'
--- tests/plugins/Dash/cardcreator/2.res.cardcreator 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/2.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
1110
=== modified file 'tests/plugins/Dash/cardcreator/3.res'
--- tests/plugins/Dash/cardcreator/3.res 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/3.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);14readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15Item { 15Item {
1616
=== modified file 'tests/plugins/Dash/cardcreator/3.res.cardcreator'
--- tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
@@ -13,8 +12,8 @@
13readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);12readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
14Item { 13Item {
15 id: artShapeHolder; 14 id: artShapeHolder;
16 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; 15 height: artShapeLoader.height;
17 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; 16 width: artShapeLoader.width;
18 anchors { horizontalCenter: parent.horizontalCenter; } 17 anchors { horizontalCenter: parent.horizontalCenter; }
19 Loader { 18 Loader {
20 id: artShapeLoader; 19 id: artShapeLoader;
@@ -34,19 +33,9 @@
34 source: artImage;33 source: artImage;
35 aspect: UbuntuShape.DropShadow;34 aspect: UbuntuShape.DropShadow;
36 }35 }
37 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;36 readonly property real aspect: 0.75;
38 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75;37 width: image.status !== Image.Ready ? 0 : image.width;
39 Component.onCompleted: { updateWidthHeightBindings(); }38 height: image.status !== Image.Ready ? 0 : image.height;
40 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
41 function updateWidthHeightBindings() {
42 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
43 width = root.fixedArtShapeSize.width;
44 height = root.fixedArtShapeSize.height;
45 } else {
46 width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
47 height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
48 }
49 }
50 CroppedImageMinimumSourceSize {39 CroppedImageMinimumSourceSize {
51 id: artImage;40 id: artImage;
52 objectName: "artImage";41 objectName: "artImage";
5342
=== modified file 'tests/plugins/Dash/cardcreator/4.res'
--- tests/plugins/Dash/cardcreator/4.res 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/4.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14readonly property size artShapeSize: Qt.size(-1, -1);14readonly property size artShapeSize: Qt.size(-1, -1);
15readonly property int headerHeight: row.height;15readonly property int headerHeight: row.height;
1616
=== modified file 'tests/plugins/Dash/cardcreator/4.res.cardcreator'
--- tests/plugins/Dash/cardcreator/4.res.cardcreator 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/4.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null;6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
1110
=== modified file 'tests/plugins/Dash/cardcreator/5.res'
--- tests/plugins/Dash/cardcreator/5.res 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/5.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: false;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: false;
13signal action(var actionId);13signal action(var actionId);
14readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);14readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15Item { 15Item {
1616
=== modified file 'tests/plugins/Dash/cardcreator/5.res.cardcreator'
--- tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-05-09 08:55:24 +0000
+++ tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true;8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
@@ -13,8 +12,8 @@
13readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);12readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
14Item { 13Item {
15 id: artShapeHolder; 14 id: artShapeHolder;
16 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; 15 height: artShapeLoader.height;
17 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; 16 width: artShapeLoader.width;
18 anchors { horizontalCenter: parent.horizontalCenter; } 17 anchors { horizontalCenter: parent.horizontalCenter; }
19 Loader { 18 Loader {
20 id: artShapeLoader; 19 id: artShapeLoader;
@@ -29,19 +28,9 @@
29 objectName: "artShape";28 objectName: "artShape";
30 visible: image.status == Image.Ready;29 visible: image.status == Image.Ready;
31 readonly property alias image: artImage;30 readonly property alias image: artImage;
32 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;31 readonly property real aspect: 1;
33 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;32 width: image.status !== Image.Ready ? 0 : image.width;
34 Component.onCompleted: { updateWidthHeightBindings(); }33 height: image.status !== Image.Ready ? 0 : image.height;
35 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
36 function updateWidthHeightBindings() {
37 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
38 width = root.fixedArtShapeSize.width;
39 height = root.fixedArtShapeSize.height;
40 } else {
41 width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
42 height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
43 }
44 }
45 CroppedImageMinimumSourceSize {34 CroppedImageMinimumSourceSize {
46 id: artImage;35 id: artImage;
47 objectName: "artImage";36 objectName: "artImage";
4837
=== modified file 'tests/plugins/Dash/cardcreator/6.res'
--- tests/plugins/Dash/cardcreator/6.res 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/6.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0;5 property real fontScale: 1.0;
6 property var scopeStyle: null;6 property var scopeStyle: null;
7 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";7 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;8 property bool showHeader: true;
11 implicitWidth: childrenRect.width;9 implicitWidth: childrenRect.width;
12 enabled: true;10 enabled: true;
11 property int fixedHeaderHeight: -1;
12 property size fixedArtShapeSize: Qt.size(-1, -1);
13signal action(var actionId);13signal action(var actionId);
14Loader {14Loader {
15 id: backgroundLoader; 15 id: backgroundLoader;
1616
=== modified file 'tests/plugins/Dash/cardcreator/6.res.cardcreator'
--- tests/plugins/Dash/cardcreator/6.res.cardcreator 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/6.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0;5 property real fontScale: 1.0;
6 property var scopeStyle: null;6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || "";7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true;8 property bool showHeader: true;
10 implicitWidth: childrenRect.width;9 implicitWidth: childrenRect.width;
1110
=== modified file 'tests/plugins/Dash/cardcreator/7.res'
--- tests/plugins/Dash/cardcreator/7.res 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/7.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14Loader {14Loader {
15 id: backgroundLoader; 15 id: backgroundLoader;
1616
=== modified file 'tests/plugins/Dash/cardcreator/7.res.cardcreator'
--- tests/plugins/Dash/cardcreator/7.res.cardcreator 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/7.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true;8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
1110
=== modified file 'tests/plugins/Dash/cardcreator/8.res'
--- tests/plugins/Dash/cardcreator/8.res 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/8.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14Loader {14Loader {
15 id: backgroundLoader; 15 id: backgroundLoader;
1616
=== modified file 'tests/plugins/Dash/cardcreator/8.res.cardcreator'
--- tests/plugins/Dash/cardcreator/8.res.cardcreator 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/8.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;
1110
=== modified file 'tests/plugins/Dash/cardcreator/9.res'
--- tests/plugins/Dash/cardcreator/9.res 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/9.res 2016-06-02 08:10:42 +0000
@@ -4,12 +4,12 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
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"] || "";
8 property bool showHeader: true;
9 implicitWidth: childrenRect.width;
10 enabled: true;
7 property int fixedHeaderHeight: -1; 11 property int fixedHeaderHeight: -1;
8 property size fixedArtShapeSize: Qt.size(-1, -1); 12 property size fixedArtShapeSize: Qt.size(-1, -1);
9 readonly property string title: cardData && cardData["title"] || "";
10 property bool showHeader: true;
11 implicitWidth: childrenRect.width;
12 enabled: true;
13signal action(var actionId);13signal action(var actionId);
14readonly property size artShapeSize: Qt.size(-1, -1);14readonly property size artShapeSize: Qt.size(-1, -1);
15readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin;15readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin;
1616
=== modified file 'tests/plugins/Dash/cardcreator/9.res.cardcreator'
--- tests/plugins/Dash/cardcreator/9.res.cardcreator 2016-05-09 08:34:38 +0000
+++ tests/plugins/Dash/cardcreator/9.res.cardcreator 2016-06-02 08:10:42 +0000
@@ -4,7 +4,6 @@
4 property string backgroundShapeStyle: "inset"; 4 property string backgroundShapeStyle: "inset";
5 property real fontScale: 1.0; 5 property real fontScale: 1.0;
6 property var scopeStyle: null; 6 property var scopeStyle: null;
7 property size fixedArtShapeSize: Qt.size(-1, -1);
8 readonly property string title: cardData && cardData["title"] || ""; 7 readonly property string title: cardData && cardData["title"] || "";
9 property bool showHeader: true; 8 property bool showHeader: true;
10 implicitWidth: childrenRect.width; 9 implicitWidth: childrenRect.width;

Subscribers

People subscribed via source and target branches