Merge lp:~mihirsoni/ubuntu-calendar-app/AgendaViewDesignFix-3 into lp:ubuntu-calendar-app

Proposed by Mihir Soni
Status: Merged
Approved by: Kunal Parmar
Approved revision: 533
Merged at revision: 535
Proposed branch: lp:~mihirsoni/ubuntu-calendar-app/AgendaViewDesignFix-3
Merge into: lp:ubuntu-calendar-app
Diff against target: 208 lines (+49/-69)
1 file modified
AgendaView.qml (+49/-69)
To merge this branch: bzr merge lp:~mihirsoni/ubuntu-calendar-app/AgendaViewDesignFix-3
Reviewer Review Type Date Requested Status
Kunal Parmar Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+239644@code.launchpad.net

Commit message

Fixed the Agenda view design fix.

Description of the change

Fixed the Agenda view design fix.
Yet to left with Multiday logic fix , will do that in another branch to track design changes properly.

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
Kunal Parmar (pkunal-parmar) wrote :

Is this code still effective ?
                            Behavior on color {
                                ColorAnimation {
                                    duration: 50
                                }
                            }

review: Needs Fixing
531. By Mihir Soni

fixed review comments

532. By Mihir Soni

Merge from trunk

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

Replaced date header with ListItemHeader added simple animation on tap of date

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
Kunal Parmar (pkunal-parmar) wrote :

looks good to me now

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'AgendaView.qml'
--- AgendaView.qml 2014-09-20 14:08:18 +0000
+++ AgendaView.qml 2014-11-03 18:40:22 +0000
@@ -19,6 +19,7 @@
19import QtQuick 2.319import QtQuick 2.3
20import QtOrganizer 5.020import QtOrganizer 5.0
21import Ubuntu.Components 1.121import Ubuntu.Components 1.1
22import Ubuntu.Components.ListItems 1.0 as ListItem
22import "dateExt.js" as DateExt23import "dateExt.js" as DateExt
2324
24Page{25Page{
@@ -64,7 +65,7 @@
64 EventListModel {65 EventListModel {
65 id: eventListModel66 id: eventListModel
66 startPeriod: currentDay.midnight();67 startPeriod: currentDay.midnight();
67 endPeriod: currentDay.addDays(30).endOfDay()68 endPeriod: currentDay.addDays(7).endOfDay()
68 filter: eventModel.filter69 filter: eventModel.filter
6970
70 sortOrders: [71 sortOrders: [
@@ -119,7 +120,8 @@
119 anchors.fill: parent120 anchors.fill: parent
120 visible: eventListModel.itemCount > 0121 visible: eventListModel.itemCount > 0
121122
122 delegate: listDelegate123 delegate:listDelegate
124
123 }125 }
124126
125 Scrollbar{127 Scrollbar{
@@ -146,13 +148,13 @@
146 return;148 return;
147 }149 }
148150
149 headerContainer.visible = false;151 headerList.visible = false;
150 if( index == 0 ) {152 if( index == 0 ) {
151 headerContainer.visible = true;153 headerList.visible = true;
152 } else {154 } else {
153 var prevEvent = eventListModel.items[index-1];155 var prevEvent = eventListModel.items[index-1];
154 if( prevEvent.startDateTime.midnight() < event.startDateTime.midnight()) {156 if( prevEvent.startDateTime.midnight() < event.startDateTime.midnight()) {
155 headerContainer.visible = true;157 headerList.visible = true;
156 }158 }
157 }159 }
158160
@@ -167,7 +169,7 @@
167 header.text = date169 header.text = date
168 timeLabel.text = timeString170 timeLabel.text = timeString
169 header.color = event.startDateTime.toLocaleDateString() === new Date().toLocaleDateString() ? UbuntuColors.orange : UbuntuColors.darkGrey171 header.color = event.startDateTime.toLocaleDateString() === new Date().toLocaleDateString() ? UbuntuColors.orange : UbuntuColors.darkGrey
170 detailsContainer.color = eventListModel.collection(event.collectionId).color172 calendarColorCode.color = eventListModel.collection(event.collectionId).color
171173
172 if( event.displayLabel) {174 if( event.displayLabel) {
173 titleLabel.text = event.displayLabel;175 titleLabel.text = event.displayLabel;
@@ -178,79 +180,69 @@
178 id: container180 id: container
179181
180 width: parent.width182 width: parent.width
181 height: detailsContainer.height + headerContainer.height +
182 (headerContainer.visible ? units.gu(2) : units.gu(0.5))
183
184 spacing: headerContainer.visible ? units.gu(1) : 0
185
186 anchors.top: parent.top183 anchors.top: parent.top
187 anchors.topMargin: headerContainer.visible ? units.gu(1.5) : units.gu(1)184
188185 ListItem.Header{
189 DayHeaderBackground{186 id:headerList
190 id: headerContainer
191
192 height: visible ? header.height + units.gu(1) : 0
193 width: parent.width
194
195 Label{187 Label{
196 id: header188 id:header
197
198 fontSize: "small"
199 width: parent.width
200 elide: Text.ElideRight
201
202 anchors {189 anchors {
203 left: parent.left190 left: parent.left
204 leftMargin: units.gu(1)191 leftMargin : units.gu(1)
205 verticalCenter: parent.verticalCenter192 verticalCenter: parent.verticalCenter
206 }193 }
207 }194 }
208195
209 MouseArea{
210 anchors.fill: parent
211 onClicked: {
212 dateSelected(event.startDateTime);
213 }
214 }
215 }
216
217 UbuntuShape{
218 id: detailsContainer
219
220 anchors {
221 left: parent.left
222 right: parent.right
223 margins: units.gu(2)
224 }
225
226 height: detailsColumn.height + units.gu(1)
227 borderSource: "radius_ide.sci"
228
229 states: [196 states: [
230 State {197 State {
231 name: "selected"198 name: "headerDateClicked"
232 when: mouseArea.pressed199 when:testClick.pressed
233
234 PropertyChanges {200 PropertyChanges {
235 target: detailsContainer201 target: header
236 borderSource: "radius_pressed.sci"202 color : header.color == UbuntuColors.orange
203 ? UbuntuColors.darkGrey
204 : UbuntuColors.orange
237 }205 }
238 }206 }
239 ]207 ]
240208
209 MouseArea{
210 id:testClick
211 anchors.fill: parent
212 onClicked: {
213 dateSelected(event.startDateTime);
214 }
215 }
216
217 }
218
219 ListItem.Standard {
220 id:eventDetails
221 showDivider: false
222 Rectangle {
223 id: calendarColorCode
224
225 width: parent.height- units.gu(2)
226 height: width
227
228 anchors {
229 left: parent.left
230 leftMargin: units.gu(2)
231 verticalCenter: parent.verticalCenter
232 }
233 }
241 Column{234 Column{
242 id: detailsColumn235 id: detailsColumn
243236
244 anchors {237 anchors {
245 top: parent.top238 top: parent.top
246 left: parent.left239 left: calendarColorCode.right
247 right: parent.right240 right: parent.right
248 margins: units.gu(0.5)241 margins: units.gu(1)
249 }242 }
250243
251 Label{244 Label{
252 id: timeLabel245 id: timeLabel
253 color:"White"
254 font.bold: true246 font.bold: true
255 fontSize: "small"247 fontSize: "small"
256 width: parent.width248 width: parent.width
@@ -258,30 +250,18 @@
258250
259 Label{251 Label{
260 id: titleLabel252 id: titleLabel
261
262 color:"White"
263 fontSize: "small"253 fontSize: "small"
264 width: parent.width254 width: parent.width
265 maximumLineCount: 2255 maximumLineCount: 2
266 elide: Text.ElideRight256 elide: Text.ElideRight
267 wrapMode: Text.WrapAtWordBoundaryOrAnywhere257 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
268
269 Behavior on color {
270 ColorAnimation {
271 duration: 50
272 }
273 }
274 }258 }
275 }259 }
276260 onClicked: {
277 MouseArea{261 pageStack.push(Qt.resolvedUrl("EventDetails.qml"), {"event":event,"model":eventListModel});
278 id: mouseArea
279 anchors.fill: parent
280 onClicked: {
281 pageStack.push(Qt.resolvedUrl("EventDetails.qml"), {"event":event,"model":eventListModel});
282 }
283 }262 }
284 }263 }
264
285 }265 }
286 }266 }
287 }267 }

Subscribers

People subscribed via source and target branches

to status/vote changes: