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

Proposed by Kunal Parmar
Status: Merged
Approved by: Mihir Soni
Approved revision: 562
Merged at revision: 562
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/MonthYearView-Redesign
Merge into: lp:ubuntu-calendar-app
Diff against target: 201 lines (+50/-50)
5 files modified
MonthComponent.qml (+17/-17)
MonthComponentDateDelegate.qml (+28/-27)
ViewHeader.qml (+2/-2)
YearViewDelegate.qml (+2/-3)
tests/autopilot/calendar_app/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/MonthYearView-Redesign
Reviewer Review Type Date Requested Status
Mihir Soni Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+243887@code.launchpad.net

Commit message

Description of the change

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: Needs Fixing (continuous-integration)
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 Kunal.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MonthComponent.qml'
2--- MonthComponent.qml 2014-11-08 02:00:10 +0000
3+++ MonthComponent.qml 2014-12-11 13:07:01 +0000
4@@ -124,22 +124,28 @@
5
6 spacing: units.gu(1.5)
7
8- ViewHeader{
9- id: monthHeader
10- month: intern.curMonth
11- year: intern.curMonthYear
12+ Loader {
13+ width: parent.width
14+ height: isYearView ? FontUtils.sizeToPixels(root.monthLabelFontSize) : 0;
15+ sourceComponent: isYearView ? headerComp : undefined
16+ Component{
17+ id: headerComp
18+ ViewHeader{
19+ id: monthHeader
20+ anchors.fill: parent
21+ month: intern.curMonth
22+ year: intern.curMonthYear
23
24- monthLabelFontSize: root.monthLabelFontSize
25- yearLabelFontSize: root.yearLabelFontSize
26- visible: isYearView === true
27+ monthLabelFontSize: root.monthLabelFontSize
28+ yearLabelFontSize: root.yearLabelFontSize
29+ }
30+ }
31 }
32
33 Item {
34 width: parent.width
35 height: dayLabelRow.height + units.gu(1)
36
37- DayHeaderBackground{}
38-
39 Row{
40 id: dayLabelRow
41
42@@ -229,14 +235,8 @@
43 text: isYearView ? day.charAt(0) : day;
44 horizontalAlignment: Text.AlignHCenter
45 font.pixelSize: intern.dayFontSize
46- color: "white"
47- }
48- }
49-
50- Component{
51- id: highLightComp
52- UbuntuShape{
53- color: "#DD4814"
54+ font.bold: true
55+ color: "black"
56 }
57 }
58 }
59
60=== modified file 'MonthComponentDateDelegate.qml'
61--- MonthComponentDateDelegate.qml 2014-11-08 02:00:10 +0000
62+++ MonthComponentDateDelegate.qml 2014-12-11 13:07:01 +0000
63@@ -13,43 +13,37 @@
64 Loader {
65 sourceComponent: isToday && isCurrentMonth ? highLightComp : undefined
66 onSourceComponentChanged: {
67- width = Qt.binding( function() { return parent.width < parent.height ? parent.width : parent.height } );
68+ width = Qt.binding( function() { return ( dateRootItem.height / 1.5 ); });
69 height = Qt.binding ( function() { return width} );
70- anchors.centerIn = Qt.binding( function() { return parent});
71+ anchors.centerIn = Qt.binding( function() { return dateLabel});
72 }
73 }
74
75- Column {
76- id: columns
77+ Label {
78+ id: dateLabel
79 anchors.centerIn: parent
80- width: parent.width
81- spacing: units.gu(0.5)
82- Label {
83- id: dateLabel
84- text: date
85- anchors.horizontalCenter: parent.horizontalCenter
86- fontSize: root.dateLabelFontSize
87- color: {
88- if( isCurrentMonth ) {
89- if(isToday) {
90- "white"
91- } else {
92- "#5D5D5D"
93- }
94+ text: date
95+ fontSize: root.dateLabelFontSize
96+ color: {
97+ if( isCurrentMonth ) {
98+ if(isToday) {
99+ "white"
100 } else {
101- "#AEA79F"
102+ "#5D5D5D"
103 }
104+ } else {
105+ "#AEA79F"
106 }
107 }
108+ }
109
110- Loader{
111- sourceComponent: showEvent ? eventIndicatorComp : undefined
112- onSourceComponentChanged: {
113- width = Qt.binding( function() { return units.gu(1) } );
114- height = Qt.binding( function() { return width } );
115- anchors.horizontalCenter = Qt.binding( function () { return parent.horizontalCenter } );
116- }
117- }
118+ Loader{
119+ width: units.gu(1)
120+ height: width
121+ anchors.horizontalCenter: parent.horizontalCenter
122+ anchors.top: dateLabel.bottom
123+ anchors.topMargin: dateRootItem.height/4
124+ sourceComponent: showEvent ? eventIndicatorComp : undefined
125 }
126
127 Component{
128@@ -61,6 +55,13 @@
129 }
130 }
131
132+ Component{
133+ id: highLightComp
134+ UbuntuShape{
135+ color: "#DD4814"
136+ }
137+ }
138+
139 MouseArea {
140 anchors.fill: parent
141 onPressAndHold: {
142
143=== modified file 'ViewHeader.qml'
144--- ViewHeader.qml 2014-09-20 10:45:35 +0000
145+++ ViewHeader.qml 2014-12-11 13:07:01 +0000
146@@ -36,7 +36,7 @@
147 text: Qt.locale().standaloneMonthName(month)
148 anchors.leftMargin: units.gu(1)
149 anchors.left: parent.left
150- //color:"white"
151+ color:"black"
152 anchors.verticalCenter: parent.verticalCenter
153 }
154
155@@ -47,7 +47,7 @@
156 text: year
157 anchors.right: parent.right
158 anchors.rightMargin: units.gu(1)
159- color:"#AEA79F"
160+ color:"black"
161 anchors.verticalCenter: parent.verticalCenter
162 }
163 }
164
165=== modified file 'YearViewDelegate.qml'
166--- YearViewDelegate.qml 2014-10-22 18:39:27 +0000
167+++ YearViewDelegate.qml 2014-12-11 13:07:01 +0000
168@@ -65,10 +65,9 @@
169 Component {
170 id: delegateComponent
171
172- UbuntuShape {
173+ Item {
174 anchors.fill: parent
175 anchors.margins: units.gu(0.5)
176- radius: "medium"
177
178 MonthComponent {
179 id: monthComponent
180@@ -84,7 +83,7 @@
181 dayLabelFontSize:"x-small"
182 dateLabelFontSize: "medium"
183 monthLabelFontSize: "medium"
184- yearLabelFontSize: "small"
185+ yearLabelFontSize: "medium"
186
187 onMonthSelected: {
188 yearViewPage.monthSelected(date);
189
190=== modified file 'tests/autopilot/calendar_app/__init__.py'
191--- tests/autopilot/calendar_app/__init__.py 2014-11-30 19:13:27 +0000
192+++ tests/autopilot/calendar_app/__init__.py 2014-12-11 13:07:01 +0000
193@@ -347,7 +347,7 @@
194
195 def get_current_month_name(self):
196 month = self.get_current_month()
197- return month.select_single('Label', objectName='monthLabel').text
198+ return month.currentMonth.datetime.strftime("%B")
199
200
201 class DayView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):

Subscribers

People subscribed via source and target branches

to status/vote changes: