Merge lp:~pkunal-parmar/ubuntu-calendar-app/Parallex_Opti into lp:ubuntu-calendar-app

Proposed by Kunal Parmar
Status: Merged
Approved by: Mihir Soni
Approved revision: 297
Merged at revision: 314
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/Parallex_Opti
Merge into: lp:ubuntu-calendar-app
Diff against target: 211 lines (+74/-57)
4 files modified
DayView.qml (+1/-0)
EventBubble.qml (+65/-50)
TimeLineBaseComponent.qml (+6/-7)
WeekView.qml (+2/-0)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/Parallex_Opti
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Mihir Soni Needs Fixing
Review via email: mp+221609@code.launchpad.net

Commit message

reduce unnecessary binding created for parallax effect and so fix the parallax effect on event bubble broken while fixing the margin.

Description of the change

reduce unnecessary binding created for parallax effect and so fix the parallax effect on event bubble broken while fixing the margin.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Looks good to me.

Thanks.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Could you please merge with trunk ?

review: Needs Fixing
297. By Kunal Parmar

Merge from trunk

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'DayView.qml'
2--- DayView.qml 2014-04-26 03:52:20 +0000
3+++ DayView.qml 2014-06-10 12:28:50 +0000
4@@ -80,6 +80,7 @@
5 width: parent.width/7 * 5
6 height: parent.height
7 z: index == dayViewPath.currentIndex ? 2 : 1
8+ isActive: true
9
10 Connections{
11 target: root
12
13=== modified file 'EventBubble.qml'
14--- EventBubble.qml 2014-05-24 07:05:31 +0000
15+++ EventBubble.qml 2014-06-10 12:28:50 +0000
16@@ -12,7 +12,7 @@
17
18 property Flickable flickable;
19
20- readonly property int minimumHeight: timeLabel.height
21+ readonly property int minimumHeight: timeLabel.height + /*top-bottom margin*/ units.gu(2)
22
23 signal clicked(var event);
24
25@@ -27,6 +27,20 @@
26 setDetails();
27 }
28
29+ //on weekview flickable changes, so we need to setup connection on flickble change
30+ onFlickableChanged: {
31+ if( flickable && height > flickable.height ) {
32+ flickable.onContentYChanged.connect(layoutBubbleDetails);
33+ }
34+ }
35+
36+ //on dayview, flickable never changed so when height changes we setup connection
37+ onHeightChanged: {
38+ if( flickable && height > flickable.height ) {
39+ flickable.onContentYChanged.connect(layoutBubbleDetails);
40+ }
41+ }
42+
43 Component.onCompleted: {
44 setDetails();
45 }
46@@ -87,70 +101,71 @@
47
48 if( infoBubble.y < flickable.contentY && infoBubble.height > flickable.height) {
49 var y = (flickable.contentY - infoBubble.y) * 1.2;
50- if( (y+ detailsColumn.height) > infoBubble.height) {
51- y = infoBubble.height - detailsColumn.height;
52+ if( ( y + detailsItems.height + units.gu(2)) > infoBubble.height) {
53+ y = infoBubble.height - detailsItems.height - units.gu(2);
54 }
55- detailsColumn.y = y;
56+ detailsItems.y = y;
57 }
58 }
59
60 Connections{
61- target: flickable
62- onContentYChanged: {
63- layoutBubbleDetails();
64- }
65- }
66- Connections{
67- target: detailsColumn
68+ target: detailsItems
69 onHeightChanged: {
70 layoutBubbleDetails();
71 }
72 }
73
74- Column{
75- id: detailsColumn
76-
77- anchors.fill: parent
78- anchors.topMargin: units.gu(1)
79- anchors.leftMargin: units.gu(1)
80- anchors.rightMargin: units.gu(1)
81-
82- Row{
83- width: parent.width
84-
85- Label{
86- id: timeLabel
87+ Item {
88+ id: detailsItems
89+
90+ visible: flickable
91+
92+ width: parent.width
93+ height: detailsColumn.height
94+
95+ Column{
96+ id: detailsColumn
97+
98+ anchors {
99+ top: parent.top; left: parent.left; right: parent.right; margins: units.gu(1)
100+ }
101+
102+ Row{
103+ width: parent.width
104+
105+ Label{
106+ id: timeLabel
107+ fontSize:"small";
108+ color:"gray"
109+ width: parent.width - rect.width
110+ }
111+ Rectangle{
112+ id:rect
113+ width: units.gu(1)
114+ radius: width/2
115+ height: width
116+ color: "#715772"
117+ }
118+ }
119+ Label{
120+ id: titleLabel
121+ fontSize:"small";
122+ color:"black"
123+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
124+ width: parent.width
125+ }
126+
127+ Label{
128+ id: descriptionLabel
129 fontSize:"small";
130 color:"gray"
131- width: parent.width - rect.width
132- }
133- Rectangle{
134- id:rect
135- width: units.gu(1)
136- radius: width/2
137- height: width
138- color: "#715772"
139- }
140- }
141- Label{
142- id: titleLabel
143- fontSize:"small";
144- color:"black"
145- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
146- width: parent.width
147- }
148-
149- Label{
150- id: descriptionLabel
151- fontSize:"small";
152- color:"gray"
153- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
154- width: parent.width
155- visible: type == wideType
156+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
157+ width: parent.width
158+ visible: type == wideType
159+ }
160 }
161 }
162
163-
164 MouseArea{
165 anchors.fill: parent
166 onClicked: {
167
168=== modified file 'TimeLineBaseComponent.qml'
169--- TimeLineBaseComponent.qml 2014-05-24 07:00:58 +0000
170+++ TimeLineBaseComponent.qml 2014-06-10 12:28:50 +0000
171@@ -10,6 +10,7 @@
172 id: root
173
174 property var startDay: DateExt.today();
175+ property bool isActive: false
176 property alias contentY: timeLineView.contentY
177 property alias contentInteractive: timeLineView.interactive
178
179@@ -141,14 +142,12 @@
180 Component {
181 id: comp
182 EventBubble {
183- type: {
184- if( root.type == ViewType.ViewTypeWeek ) {
185- narrowType
186- } else {
187- wideType
188- }
189+ type: root.type == ViewType.ViewTypeWeek ? narrowType : wideType
190+
191+ anchors{
192+ left: parent.left; right: parent.right
193 }
194- flickable: timeLineView
195+ flickable: root.isActive ? timeLineView : null
196 clip: true
197 }
198 }
199
200=== modified file 'WeekView.qml'
201--- WeekView.qml 2014-04-11 00:21:42 +0000
202+++ WeekView.qml 2014-06-10 12:28:50 +0000
203@@ -74,6 +74,8 @@
204 width: parent.width
205 height: parent.height
206
207+ isActive: timeLineView.PathView.isCurrentItem
208+
209 startDay: firstDay.addDays( weekViewPath.indexType(index) * 7)
210
211 Connections{

Subscribers

People subscribed via source and target branches

to status/vote changes: