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
1=== modified file 'AgendaView.qml'
2--- AgendaView.qml 2014-09-20 14:08:18 +0000
3+++ AgendaView.qml 2014-11-03 18:40:22 +0000
4@@ -19,6 +19,7 @@
5 import QtQuick 2.3
6 import QtOrganizer 5.0
7 import Ubuntu.Components 1.1
8+import Ubuntu.Components.ListItems 1.0 as ListItem
9 import "dateExt.js" as DateExt
10
11 Page{
12@@ -64,7 +65,7 @@
13 EventListModel {
14 id: eventListModel
15 startPeriod: currentDay.midnight();
16- endPeriod: currentDay.addDays(30).endOfDay()
17+ endPeriod: currentDay.addDays(7).endOfDay()
18 filter: eventModel.filter
19
20 sortOrders: [
21@@ -119,7 +120,8 @@
22 anchors.fill: parent
23 visible: eventListModel.itemCount > 0
24
25- delegate: listDelegate
26+ delegate:listDelegate
27+
28 }
29
30 Scrollbar{
31@@ -146,13 +148,13 @@
32 return;
33 }
34
35- headerContainer.visible = false;
36+ headerList.visible = false;
37 if( index == 0 ) {
38- headerContainer.visible = true;
39+ headerList.visible = true;
40 } else {
41 var prevEvent = eventListModel.items[index-1];
42 if( prevEvent.startDateTime.midnight() < event.startDateTime.midnight()) {
43- headerContainer.visible = true;
44+ headerList.visible = true;
45 }
46 }
47
48@@ -167,7 +169,7 @@
49 header.text = date
50 timeLabel.text = timeString
51 header.color = event.startDateTime.toLocaleDateString() === new Date().toLocaleDateString() ? UbuntuColors.orange : UbuntuColors.darkGrey
52- detailsContainer.color = eventListModel.collection(event.collectionId).color
53+ calendarColorCode.color = eventListModel.collection(event.collectionId).color
54
55 if( event.displayLabel) {
56 titleLabel.text = event.displayLabel;
57@@ -178,79 +180,69 @@
58 id: container
59
60 width: parent.width
61- height: detailsContainer.height + headerContainer.height +
62- (headerContainer.visible ? units.gu(2) : units.gu(0.5))
63-
64- spacing: headerContainer.visible ? units.gu(1) : 0
65-
66 anchors.top: parent.top
67- anchors.topMargin: headerContainer.visible ? units.gu(1.5) : units.gu(1)
68-
69- DayHeaderBackground{
70- id: headerContainer
71-
72- height: visible ? header.height + units.gu(1) : 0
73- width: parent.width
74-
75+
76+ ListItem.Header{
77+ id:headerList
78 Label{
79- id: header
80-
81- fontSize: "small"
82- width: parent.width
83- elide: Text.ElideRight
84-
85+ id:header
86 anchors {
87 left: parent.left
88- leftMargin: units.gu(1)
89+ leftMargin : units.gu(1)
90 verticalCenter: parent.verticalCenter
91 }
92 }
93
94- MouseArea{
95- anchors.fill: parent
96- onClicked: {
97- dateSelected(event.startDateTime);
98- }
99- }
100- }
101-
102- UbuntuShape{
103- id: detailsContainer
104-
105- anchors {
106- left: parent.left
107- right: parent.right
108- margins: units.gu(2)
109- }
110-
111- height: detailsColumn.height + units.gu(1)
112- borderSource: "radius_ide.sci"
113-
114 states: [
115 State {
116- name: "selected"
117- when: mouseArea.pressed
118-
119+ name: "headerDateClicked"
120+ when:testClick.pressed
121 PropertyChanges {
122- target: detailsContainer
123- borderSource: "radius_pressed.sci"
124+ target: header
125+ color : header.color == UbuntuColors.orange
126+ ? UbuntuColors.darkGrey
127+ : UbuntuColors.orange
128 }
129 }
130 ]
131
132+ MouseArea{
133+ id:testClick
134+ anchors.fill: parent
135+ onClicked: {
136+ dateSelected(event.startDateTime);
137+ }
138+ }
139+
140+ }
141+
142+ ListItem.Standard {
143+ id:eventDetails
144+ showDivider: false
145+ Rectangle {
146+ id: calendarColorCode
147+
148+ width: parent.height- units.gu(2)
149+ height: width
150+
151+ anchors {
152+ left: parent.left
153+ leftMargin: units.gu(2)
154+ verticalCenter: parent.verticalCenter
155+ }
156+ }
157 Column{
158 id: detailsColumn
159
160 anchors {
161 top: parent.top
162- left: parent.left
163+ left: calendarColorCode.right
164 right: parent.right
165- margins: units.gu(0.5)
166+ margins: units.gu(1)
167 }
168
169 Label{
170 id: timeLabel
171- color:"White"
172 font.bold: true
173 fontSize: "small"
174 width: parent.width
175@@ -258,30 +250,18 @@
176
177 Label{
178 id: titleLabel
179-
180- color:"White"
181 fontSize: "small"
182 width: parent.width
183 maximumLineCount: 2
184 elide: Text.ElideRight
185 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
186-
187- Behavior on color {
188- ColorAnimation {
189- duration: 50
190- }
191- }
192 }
193 }
194-
195- MouseArea{
196- id: mouseArea
197- anchors.fill: parent
198- onClicked: {
199- pageStack.push(Qt.resolvedUrl("EventDetails.qml"), {"event":event,"model":eventListModel});
200- }
201+ onClicked: {
202+ pageStack.push(Qt.resolvedUrl("EventDetails.qml"), {"event":event,"model":eventListModel});
203 }
204 }
205+
206 }
207 }
208 }

Subscribers

People subscribed via source and target branches

to status/vote changes: