~paulliu/unity8/noninteractive20140804

« back to all changes in this revision

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

  • Committer: Ying-Chun Liu
  • Date: 2014-10-09 13:57:21 UTC
  • Revision ID: paul.liu@canonical.com-20141009135721-pg7jfriezx539v0a
Fix results

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AbstractButton { 
2
 
                id: root; 
3
 
                property var template; 
4
 
                property var components; 
5
 
                property var cardData; 
6
 
                property var artShapeBorderSource: undefined; 
7
 
                property real fontScale: 1.0; 
8
 
                property var scopeStyle: null; 
9
 
                property int titleAlignment: Text.AlignLeft; 
10
 
                property int fixedHeaderHeight: -1; 
11
 
                property size fixedArtShapeSize: Qt.size(-1, -1); 
12
 
                readonly property string title: cardData && cardData["title"] || ""; 
13
 
                property bool asynchronous: true; 
14
 
                property bool showHeader: true; 
15
 
                implicitWidth: childrenRect.width; 
 
1
AbstractButton {
 
2
                id: root;
 
3
                property var template;
 
4
                property var components;
 
5
                property var cardData;
 
6
                property var artShapeBorderSource: undefined;
 
7
                property real fontScale: 1.0;
 
8
                property var scopeStyle: null;
 
9
                property int titleAlignment: Text.AlignLeft;
 
10
                property int fixedHeaderHeight: -1;
 
11
                property size fixedArtShapeSize: Qt.size(-1, -1);
 
12
                readonly property string title: cardData && cardData["title"] || "";
 
13
                property bool asynchronous: true;
 
14
                property bool showHeader: true;
 
15
                implicitWidth: childrenRect.width;
16
16
Loader {
17
17
                                id: backgroundLoader; 
18
18
                                objectName: "backgroundLoader"; 
51
51
Item { 
52
52
                            id: headerTitleContainer; 
53
53
                            anchors { right: parent.right; left: parent.left;
54
 
top: parent.top; 
55
 
                                     topMargin: units.gu(1);
56
 
leftMargin: units.gu(1); 
57
 
 } 
 
54
                            top: parent.top; 
 
55
                            topMargin: units.gu(1);
 
56
                            leftMargin: units.gu(1);
 
57
                            } 
58
58
                            width: parent.width - x; 
59
59
                            implicitHeight: titleLabel.height + subtitleLabel.height; 
60
60
                            data: [ 
62
62
                        id: titleLabel; 
63
63
                        objectName: "titleLabel"; 
64
64
                        anchors { right: emblemIcon.left; 
65
 
                                rightMargin: emblemIcon.width > 0 ? units.gu(0.5) : 0; 
66
 
left: parent.left; 
67
 
                             top: parent.top; } 
 
65
                        rightMargin: emblemIcon.width > 0 ? units.gu(0.5) : 0; 
 
66
                        left: parent.left; 
 
67
                        top: parent.top; } 
68
68
                        elide: Text.ElideRight; 
69
69
                        fontSize: "small"; 
70
70
                        wrapMode: Text.Wrap; 
71
71
                        maximumLineCount: 2; 
72
72
                        font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); 
73
 
                        color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white"); 
 
73
                        color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
74
74
                        visible: showHeader ; 
75
75
                        text: root.title; 
76
76
                        font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal; 
80
80
                            id: subtitleLabel; 
81
81
                            objectName: "subtitleLabel"; 
82
82
                            anchors { right: parent.right; 
83
 
                               left: parent.left; 
84
 
rightMargin: units.gu(1); 
85
 
top: titleLabel.bottom;
86
 
 } 
 
83
                            left: parent.left; 
 
84
                            rightMargin: units.gu(1); 
 
85
                            top: titleLabel.bottom;
 
86
                            } 
87
87
                            anchors.topMargin: units.dp(2); 
88
88
                            elide: Text.ElideRight; 
89
89
                            fontSize: "x-small"; 
90
90
                            font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); 
91
 
                            color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white"); 
 
91
                            color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
92
92
                            visible: titleLabel.visible && titleLabel.text; 
93
93
                            text: cardData && cardData["subtitle"] || ""; 
94
94
                            font.weight: Font.Light; 
97
97
                            id: emblemIcon; 
98
98
                            objectName: "emblemIcon"; 
99
99
                            anchors { 
100
 
                                bottom: titleLabel.baseline; 
101
 
                                right: parent.right; 
102
 
                                rightMargin: units.gu(1); 
103
 
 
 
100
                            bottom: titleLabel.baseline; 
 
101
                            right: parent.right; 
 
102
                            rightMargin: units.gu(1); 
104
103
                            } 
105
104
                            source: cardData && cardData["emblem"] || ""; 
106
 
                            color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white"); 
 
105
                            color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
107
106
                            height: source != "" ? titleLabel.font.pixelSize : 0; 
108
107
                        }
109
108
 
110
109
                            ]
111
110
                        }
112
 
UbuntuShape { 
113
 
                        id: touchdown; 
114
 
                        objectName: "touchdown"; 
115
 
                        anchors { fill: backgroundLoader } 
116
 
                        visible: { 
117
 
                            if (root.template && root.template["non-interactive"]) { 
118
 
                                return false; 
119
 
                            } 
120
 
                            return root.pressed; 
121
 
                        } 
122
 
                        radius: "medium"; 
123
 
                        borderSource: "radius_pressed.sci" 
124
 
                    }
 
111
UbuntuShape {
 
112
    id: touchdown;
 
113
    objectName: "touchdown";
 
114
    anchors { fill: backgroundLoader }
 
115
    visible: { 
 
116
        if (root.template && root.template["non-interactive"]) { 
 
117
            return false; 
 
118
        } 
 
119
        return root.pressed;
 
120
    } 
 
121
    radius: "medium";
 
122
    borderSource: "radius_pressed.sci"
 
123
}
125
124
implicitHeight: headerTitleContainer.y + headerTitleContainer.height + units.gu(1);
126
125
}