Merge lp:~unity-team/unity/phablet-people-delegate-loader into lp:unity/phablet

Proposed by Günter Schwann
Status: Merged
Approved by: Andrea Cimitan
Approved revision: no longer in the source branch.
Merged at revision: 472
Proposed branch: lp:~unity-team/unity/phablet-people-delegate-loader
Merge into: lp:unity/phablet
Prerequisite: lp:~unity-team/unity/phablet.release-162
Diff against target: 194 lines (+102/-75)
1 file modified
Dash/People/CarouselDelegatePeople.qml (+102/-75)
To merge this branch: bzr merge lp:~unity-team/unity/phablet-people-delegate-loader
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Andrea Cimitan (community) Approve
Review via email: mp+153612@code.launchpad.net

This proposal supersedes a proposal from 2013-03-12.

Commit message

Use a Loader to improve delegate creation time

Description of the change

Use a Loader to improve delegate creation time

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal

Works but qml complains about binding loops

file:///home/phablet/shell/Dash/People/CarouselDelegatePeople.qml:94:17: QML Label: Binding loop detected for property "width"
file:///home/phablet/shell/Dash/People/CarouselDelegatePeople.qml:70:13: QML Column: Binding loop detected for property "minimumHeight"

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:457
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~unity-team/unity/phablet-people-delegate-loader/+merge/153612/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-phablet-ci/44/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-quantal-armhf-ci/45/console
        deb: http://jenkins.qa.ubuntu.com/job/unity-phablet-quantal-armhf-ci/45/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-quantal-i386-ci/44/console

Click here to trigger a rebuild:
http://jenkins.qa.ubuntu.com/job/unity-phablet-ci/44/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:457
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~unity-team/unity/phablet-people-delegate-loader/+merge/153612/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-phablet-ci/49/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-quantal-armhf-ci/50/console
        deb: http://jenkins.qa.ubuntu.com/job/unity-phablet-quantal-armhf-ci/50/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-quantal-i386-ci/49/console

Click here to trigger a rebuild:
http://jenkins.qa.ubuntu.com/job/unity-phablet-ci/49/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Dash/People/CarouselDelegatePeople.qml'
2--- Dash/People/CarouselDelegatePeople.qml 2013-02-18 19:58:47 +0000
3+++ Dash/People/CarouselDelegatePeople.qml 2013-03-15 18:11:25 +0000
4@@ -36,8 +36,107 @@
5 }
6 }
7
8- Item {
9- id: frame
10+ Component {
11+ id: component_frame
12+ Item {
13+ id: frame
14+
15+ BorderImage {
16+ // TODO This will go away once we have 'clip: true' in UbuntuShape
17+ anchors.centerIn: parent
18+ width: parent.width + units.gu(1.5)
19+ height: parent.height + units.gu(1.5)
20+ visible: labelRemotePost.visible
21+ opacity: 0.9
22+ source: "graphics/bottomshape.sci"
23+ }
24+
25+ property bool showRemoteDetails: true
26+ // To decide if the remote icon and time should be shown, its once layed out to do so.
27+ // Then it's checked if everything fits in the frame size. If not, showRemoteDetails is set false
28+ // Using bindings to do so cause a binding loop
29+ function checkSizeForRemoteDetails() {
30+ showRemoteDetails = true
31+ showRemoteDetails = (frame.height - column.minimumHeight) >= labelRemotePostTime.height
32+ }
33+
34+ Item {
35+ id: remoteSourceIconContainer
36+
37+ // TODO use proper asset and get rid of these dimensions
38+ width: units.gu(3)
39+ height: units.gu(4)
40+ visible: showRemoteDetails
41+
42+ Image {
43+ anchors.centerIn: parent
44+ anchors.horizontalCenterOffset: units.gu(1)
45+ source: dataModel.remoteSourceIcon ? dataModel.remoteSourceIcon : ""
46+ fillMode: Image.PreserveAspectFit
47+ }
48+ }
49+
50+ Column {
51+ id: column
52+
53+ property real minimumHeight: labelName.height + labelRemotePost.height + anchors.topMargin + anchors.bottomMargin
54+
55+ anchors {
56+ left: remoteSourceIconContainer.visible ? remoteSourceIconContainer.right : parent.left
57+ right: parent.right
58+ top: remoteSourceIconContainer.visible ? parent.top : undefined
59+ verticalCenter: remoteSourceIconContainer.visible ? undefined : parent.verticalCenter
60+ margins: units.gu(1)
61+ }
62+
63+ Label {
64+ id: labelName
65+
66+ width: parent.width
67+ text: dataModel.name ? dataModel.name : ""
68+ color: "white"
69+ fontSize: "x-small"
70+ elide: Text.ElideRight
71+ font.weight: Font.Bold
72+ onTextChanged: checkSizeForRemoteDetails()
73+ }
74+
75+ Label {
76+ id: labelRemotePost
77+
78+ width: parent.width
79+ text: dataModel.remotePost ? dataModel.remotePost : ""
80+ color: "white"
81+ opacity: 0.8
82+ fontSize: "xx-small"
83+ elide: Text.ElideRight
84+ maximumLineCount: 2
85+ wrapMode: Text.WordWrap
86+ onTextChanged: checkSizeForRemoteDetails()
87+ }
88+
89+ Label {
90+ id: labelRemotePostTime
91+
92+ width: parent.width
93+ text: model.remotePostTime ? model.remotePostTime : ""
94+ color: "white"
95+ opacity: 0.5
96+ fontSize: "xx-small"
97+ elide: Text.ElideRight
98+ visible: showRemoteDetails
99+ onTextChanged: checkSizeForRemoteDetails()
100+ }
101+ }
102+
103+ onHeightChanged: checkSizeForRemoteDetails()
104+ onWidthChanged: checkSizeForRemoteDetails()
105+ Component.onCompleted: checkSizeForRemoteDetails()
106+ }
107+ }
108+
109+ Loader {
110+ id: loader_frame
111
112 anchors {
113 left: parent.left
114@@ -54,79 +153,7 @@
115 }
116 }
117
118- BorderImage {
119- // TODO This will go away once we have 'clip: true' in UbuntuShape
120- anchors.centerIn: parent
121- width: parent.width + units.gu(1.5)
122- height: parent.height + units.gu(1.5)
123- visible: labelRemotePost.visible
124- opacity: 0.9
125- source: "graphics/bottomshape.sci"
126- }
127-
128- Item {
129- id: remoteSourceIconContainer
130-
131- // TODO use proper asset and get rid of these dimensions
132- width: units.gu(3)
133- height: units.gu(4)
134- visible: labelRemotePostTime.visible
135-
136- Image {
137- anchors.centerIn: parent
138- anchors.horizontalCenterOffset: units.gu(1)
139- source: dataModel.remoteSourceIcon ? dataModel.remoteSourceIcon : ""
140- fillMode: Image.PreserveAspectFit
141- }
142- }
143-
144- Column {
145- id: column
146-
147- property real minimumHeight: labelName.height + labelRemotePost.height + anchors.topMargin + anchors.bottomMargin
148-
149- anchors {
150- left: remoteSourceIconContainer.visible ? remoteSourceIconContainer.right : parent.left
151- right: parent.right
152- top: remoteSourceIconContainer.visible ? parent.top : undefined
153- verticalCenter: remoteSourceIconContainer.visible ? undefined : parent.verticalCenter
154- margins: units.gu(1)
155- }
156-
157- Label {
158- id: labelName
159-
160- width: parent.width
161- text: dataModel.name ? dataModel.name : ""
162- color: "white"
163- fontSize: "x-small"
164- elide: Text.ElideRight
165- font.weight: Font.Bold
166- }
167- Label {
168- id: labelRemotePost
169-
170- width: parent.width
171- text: dataModel.remotePost ? dataModel.remotePost : ""
172- color: "white"
173- opacity: 0.8
174- fontSize: "xx-small"
175- elide: Text.ElideRight
176- maximumLineCount: 2
177- wrapMode: Text.WordWrap
178- }
179- Label {
180- id: labelRemotePostTime
181-
182- width: parent.width
183- text: model.remotePostTime ? model.remotePostTime : ""
184- color: "white"
185- opacity: 0.5
186- fontSize: "xx-small"
187- elide: Text.ElideRight
188- visible: frame.height - parent.minimumHeight >= height
189- }
190- }
191+ sourceComponent: opacity > 0 ? component_frame : undefined
192 }
193
194 BorderImage {

Subscribers

People subscribed via source and target branches

to all changes: