~mzanetti/unity8/fix-1648251

« back to all changes in this revision

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

  • Committer: Michael Zanetti
  • Date: 2016-10-13 11:02:11 UTC
  • mfrom: (2525.1.132 unity8)
  • Revision ID: michael.zanetti@canonical.com-20161013110211-tj2gly2dxaqj5t2e
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
                property int fixedHeaderHeight: -1; 
12
12
                property size fixedArtShapeSize: Qt.size(-1, -1); 
13
13
signal action(var actionId);
14
 
readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
15
 
Item  { 
16
 
                            id: artShapeHolder; 
17
 
                            height: root.fixedArtShapeSize.height;
18
 
                            width: root.fixedArtShapeSize.width;
19
 
                            anchors { horizontalCenter: parent.horizontalCenter; } 
20
 
                            Loader { 
 
14
Loader  {
21
15
                                id: artShapeLoader; 
 
16
                                height: root.fixedArtShapeSize.height; 
 
17
                                width: root.fixedArtShapeSize.width; 
 
18
                                anchors { horizontalCenter: parent.horizontalCenter; }
22
19
                                objectName: "artShapeLoader"; 
23
20
                                readonly property string cardArt: cardData && cardData["art"] || ""; 
24
21
                                onCardArtChanged: { if (item) { item.image.source = cardArt; } }
25
22
                                active: cardArt != ""; 
26
23
                                asynchronous: true; 
27
 
                                visible: status == Loader.Ready;
 
24
                                visible: status === Loader.Ready;
28
25
                                sourceComponent: Item {
29
26
                                    id: artShape;
30
27
                                    objectName: "artShape";
31
 
                                    visible: image.status == Image.Ready;
 
28
                                    visible: image.status === Image.Ready;
32
29
                                    readonly property alias image: artImage;
33
30
                                    UbuntuShape {
34
31
                                        anchors.fill: parent;
49
46
                                        height: width / (root.fixedArtShapeSize.width / root.fixedArtShapeSize.height);
50
47
                                    }
51
48
                                } 
52
 
                            } 
53
49
                        }
54
50
readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
55
51
Label { 
57
53
                        objectName: "titleLabel"; 
58
54
                        anchors { right: parent.right;
59
55
                        left: parent.left;
60
 
                        top: artShapeHolder.bottom; 
 
56
                        top: artShapeLoader.bottom;
61
57
                        topMargin: units.gu(1);
62
58
                        } 
63
59
                        elide: Text.ElideRight; 
98
94
    model: cardData && cardData["socialActions"];
99
95
    onClicked: root.action(actionId);
100
96
}
101
 
UbuntuShape {
102
 
    id: touchdown;
103
 
    objectName: "touchdown";
104
 
    anchors { fill: artShapeHolder }
105
 
    visible: root.pressed;
106
 
    radius: "medium";
107
 
    borderSource: "radius_pressed.sci"
 
97
Loader {
 
98
    active: root.pressed;
 
99
    anchors { fill: artShapeLoader }
 
100
    sourceComponent: UbuntuShape {
 
101
        objectName: "touchdown";
 
102
        anchors.fill: parent;
 
103
        radius: "medium";
 
104
        borderSource: "radius_pressed.sci"
 
105
    }
108
106
}
109
107
implicitHeight: socialActionsRow.y + socialActionsRow.height + units.gu(1);
110
108
}