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
=== modified file 'MonthComponent.qml'
--- MonthComponent.qml 2014-11-08 02:00:10 +0000
+++ MonthComponent.qml 2014-12-11 13:07:01 +0000
@@ -124,22 +124,28 @@
124124
125 spacing: units.gu(1.5)125 spacing: units.gu(1.5)
126126
127 ViewHeader{127 Loader {
128 id: monthHeader128 width: parent.width
129 month: intern.curMonth129 height: isYearView ? FontUtils.sizeToPixels(root.monthLabelFontSize) : 0;
130 year: intern.curMonthYear130 sourceComponent: isYearView ? headerComp : undefined
131 Component{
132 id: headerComp
133 ViewHeader{
134 id: monthHeader
135 anchors.fill: parent
136 month: intern.curMonth
137 year: intern.curMonthYear
131138
132 monthLabelFontSize: root.monthLabelFontSize139 monthLabelFontSize: root.monthLabelFontSize
133 yearLabelFontSize: root.yearLabelFontSize140 yearLabelFontSize: root.yearLabelFontSize
134 visible: isYearView === true141 }
142 }
135 }143 }
136144
137 Item {145 Item {
138 width: parent.width146 width: parent.width
139 height: dayLabelRow.height + units.gu(1)147 height: dayLabelRow.height + units.gu(1)
140148
141 DayHeaderBackground{}
142
143 Row{149 Row{
144 id: dayLabelRow150 id: dayLabelRow
145151
@@ -229,14 +235,8 @@
229 text: isYearView ? day.charAt(0) : day;235 text: isYearView ? day.charAt(0) : day;
230 horizontalAlignment: Text.AlignHCenter236 horizontalAlignment: Text.AlignHCenter
231 font.pixelSize: intern.dayFontSize237 font.pixelSize: intern.dayFontSize
232 color: "white"238 font.bold: true
233 }239 color: "black"
234 }
235
236 Component{
237 id: highLightComp
238 UbuntuShape{
239 color: "#DD4814"
240 }240 }
241 }241 }
242}242}
243243
=== modified file 'MonthComponentDateDelegate.qml'
--- MonthComponentDateDelegate.qml 2014-11-08 02:00:10 +0000
+++ MonthComponentDateDelegate.qml 2014-12-11 13:07:01 +0000
@@ -13,43 +13,37 @@
13 Loader {13 Loader {
14 sourceComponent: isToday && isCurrentMonth ? highLightComp : undefined14 sourceComponent: isToday && isCurrentMonth ? highLightComp : undefined
15 onSourceComponentChanged: {15 onSourceComponentChanged: {
16 width = Qt.binding( function() { return parent.width < parent.height ? parent.width : parent.height } );16 width = Qt.binding( function() { return ( dateRootItem.height / 1.5 ); });
17 height = Qt.binding ( function() { return width} );17 height = Qt.binding ( function() { return width} );
18 anchors.centerIn = Qt.binding( function() { return parent});18 anchors.centerIn = Qt.binding( function() { return dateLabel});
19 }19 }
20 }20 }
2121
22 Column {22 Label {
23 id: columns23 id: dateLabel
24 anchors.centerIn: parent24 anchors.centerIn: parent
25 width: parent.width25 text: date
26 spacing: units.gu(0.5)26 fontSize: root.dateLabelFontSize
27 Label {27 color: {
28 id: dateLabel28 if( isCurrentMonth ) {
29 text: date29 if(isToday) {
30 anchors.horizontalCenter: parent.horizontalCenter30 "white"
31 fontSize: root.dateLabelFontSize
32 color: {
33 if( isCurrentMonth ) {
34 if(isToday) {
35 "white"
36 } else {
37 "#5D5D5D"
38 }
39 } else {31 } else {
40 "#AEA79F"32 "#5D5D5D"
41 }33 }
34 } else {
35 "#AEA79F"
42 }36 }
43 }37 }
38 }
4439
45 Loader{40 Loader{
46 sourceComponent: showEvent ? eventIndicatorComp : undefined41 width: units.gu(1)
47 onSourceComponentChanged: {42 height: width
48 width = Qt.binding( function() { return units.gu(1) } );43 anchors.horizontalCenter: parent.horizontalCenter
49 height = Qt.binding( function() { return width } );44 anchors.top: dateLabel.bottom
50 anchors.horizontalCenter = Qt.binding( function () { return parent.horizontalCenter } );45 anchors.topMargin: dateRootItem.height/4
51 }46 sourceComponent: showEvent ? eventIndicatorComp : undefined
52 }
53 }47 }
5448
55 Component{49 Component{
@@ -61,6 +55,13 @@
61 }55 }
62 }56 }
6357
58 Component{
59 id: highLightComp
60 UbuntuShape{
61 color: "#DD4814"
62 }
63 }
64
64 MouseArea {65 MouseArea {
65 anchors.fill: parent66 anchors.fill: parent
66 onPressAndHold: {67 onPressAndHold: {
6768
=== modified file 'ViewHeader.qml'
--- ViewHeader.qml 2014-09-20 10:45:35 +0000
+++ ViewHeader.qml 2014-12-11 13:07:01 +0000
@@ -36,7 +36,7 @@
36 text: Qt.locale().standaloneMonthName(month)36 text: Qt.locale().standaloneMonthName(month)
37 anchors.leftMargin: units.gu(1)37 anchors.leftMargin: units.gu(1)
38 anchors.left: parent.left38 anchors.left: parent.left
39 //color:"white"39 color:"black"
40 anchors.verticalCenter: parent.verticalCenter40 anchors.verticalCenter: parent.verticalCenter
41 }41 }
4242
@@ -47,7 +47,7 @@
47 text: year47 text: year
48 anchors.right: parent.right48 anchors.right: parent.right
49 anchors.rightMargin: units.gu(1)49 anchors.rightMargin: units.gu(1)
50 color:"#AEA79F"50 color:"black"
51 anchors.verticalCenter: parent.verticalCenter51 anchors.verticalCenter: parent.verticalCenter
52 }52 }
53}53}
5454
=== modified file 'YearViewDelegate.qml'
--- YearViewDelegate.qml 2014-10-22 18:39:27 +0000
+++ YearViewDelegate.qml 2014-12-11 13:07:01 +0000
@@ -65,10 +65,9 @@
65 Component {65 Component {
66 id: delegateComponent66 id: delegateComponent
6767
68 UbuntuShape {68 Item {
69 anchors.fill: parent69 anchors.fill: parent
70 anchors.margins: units.gu(0.5)70 anchors.margins: units.gu(0.5)
71 radius: "medium"
7271
73 MonthComponent {72 MonthComponent {
74 id: monthComponent73 id: monthComponent
@@ -84,7 +83,7 @@
84 dayLabelFontSize:"x-small"83 dayLabelFontSize:"x-small"
85 dateLabelFontSize: "medium"84 dateLabelFontSize: "medium"
86 monthLabelFontSize: "medium"85 monthLabelFontSize: "medium"
87 yearLabelFontSize: "small"86 yearLabelFontSize: "medium"
8887
89 onMonthSelected: {88 onMonthSelected: {
90 yearViewPage.monthSelected(date);89 yearViewPage.monthSelected(date);
9190
=== modified file 'tests/autopilot/calendar_app/__init__.py'
--- tests/autopilot/calendar_app/__init__.py 2014-11-30 19:13:27 +0000
+++ tests/autopilot/calendar_app/__init__.py 2014-12-11 13:07:01 +0000
@@ -347,7 +347,7 @@
347347
348 def get_current_month_name(self):348 def get_current_month_name(self):
349 month = self.get_current_month()349 month = self.get_current_month()
350 return month.select_single('Label', objectName='monthLabel').text350 return month.currentMonth.datetime.strftime("%B")
351351
352352
353class DayView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):353class DayView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):

Subscribers

People subscribed via source and target branches

to status/vote changes: