~aacid/unity8/moreAsyncAudioCard

« back to all changes in this revision

Viewing changes to tests/plugins/Dash/cardcreator/5.res

  • Committer: Albert Astals Cid
  • Date: 2016-03-10 08:32:16 UTC
  • mfrom: (2136.2.83 unity8)
  • Revision ID: albert.astals@canonical.com-20160310083216-8nnplxl85qx13xd0
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
AbstractButton { 
2
2
                id: root; 
3
 
                property var components; 
4
3
                property var cardData; 
5
4
                property string artShapeStyle: "inset"; 
6
5
                property string backgroundShapeStyle: "inset"; 
24
23
                            Loader { 
25
24
                                id: artShapeLoader; 
26
25
                                objectName: "artShapeLoader"; 
27
 
                                active: cardData && cardData["art"] || false; 
 
26
                                readonly property string cardArt: cardData && cardData["art"] || "";
 
27
                                active: cardArt != "";
28
28
                                asynchronous: root.asynchronous; 
29
29
                                visible: status == Loader.Ready;
30
30
                                sourceComponent: Item {
31
31
                                    id: artShape;
32
32
                                    objectName: "artShape";
33
 
                                    readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
34
33
                                    visible: image.status == Image.Ready;
35
34
                                    readonly property alias image: artImage;
36
35
                                    ShaderEffectSource {
39
38
                                        anchors.centerIn: parent;
40
39
                                        width: 1;
41
40
                                        height: 1;
42
 
                                        hideSource: doShapeItem;
 
41
                                        hideSource: false;
43
42
                                    }
44
43
                                    Loader {
45
44
                                        anchors.fill: parent;
46
 
                                        visible: artShape.doShapeItem;
 
45
                                        visible: false;
47
46
                                        sourceComponent: root.artShapeStyle === "icon" ? artShapeIconComponent : artShapeShapeComponent;
48
47
                                        Component {
49
48
                                            id: artShapeShapeComponent;
67
66
                                        }
68
67
                                    }
69
68
                                    readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
70
 
                                    readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
 
69
                                    readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;
71
70
                                    Component.onCompleted: { updateWidthHeightBindings(); }
72
71
                                    Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
73
72
                                    function updateWidthHeightBindings() {
82
81
                                    CroppedImageMinimumSourceSize {
83
82
                                        id: artImage;
84
83
                                        objectName: "artImage";
85
 
                                        source: cardData && cardData["art"] || "";
 
84
                                        source: artShapeLoader.cardArt;
86
85
                                        asynchronous: root.asynchronous;
87
86
                                        width: root.width;
88
87
                                        height: width / artShape.aspect;