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

Proposed by Kunal Parmar
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 99
Merged at revision: 105
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/bug_1218268
Merge into: lp:ubuntu-calendar-app
Diff against target: 100 lines (+10/-15)
2 files modified
DayView.qml (+6/-10)
WeekRibbon.qml (+4/-5)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/bug_1218268
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Olivier Tilloy (community) Approve
Review via email: mp+183149@code.launchpad.net

Commit message

Fix alignment of the top ribbon in the day view.

To post a comment you must log in.
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

Please verify on device if this fixes issue or not.

I just tried to make DayView's ribbon's width similar to WeekView's. I suspect that's problem.

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
Olivier Tilloy (osomon) wrote :

Although better than the current situation, it doesn’t look as it should. See screen capture here, taken on a Galaxy Nexus: http://imgur.com/rP9Bco5.

review: Needs Fixing
Revision history for this message
Sam Bull (dreamsorcerer) wrote :

That screenshot looks pretty much identical to the unpatched version running on my Nexus 4, it's just scrolled the ribbon about 5 pixels to the right.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

> Although better than the current situation, it doesn’t look as it should. See
> screen capture here, taken on a Galaxy Nexus: http://imgur.com/rP9Bco5.

Right, issue it not fixed yet. I made some further changes. Can you try again ?

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
Olivier Tilloy (osomon) wrote :

> Right, issue it not fixed yet. I made some further changes. Can you try again
> ?

Looks good now. 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
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: Needs Fixing (continuous-integration)
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: Needs Fixing (continuous-integration)
99. 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
=== modified file 'DayView.qml'
--- DayView.qml 2013-08-27 14:41:12 +0000
+++ DayView.qml 2013-09-03 15:16:52 +0000
@@ -13,7 +13,7 @@
13 property var currentDay: new Date()13 property var currentDay: new Date()
1414
15 onCurrentDayChanged:{15 onCurrentDayChanged:{
16 weekRibbon.visibleWeek = currentDay.weekStart(intern.firstDayOfWeek);16 weekRibbon.visibleWeek = currentDay.weekStart(Qt.locale().firstDayOfWeek);
17 weekRibbon.setSelectedDay(currentDay);17 weekRibbon.setSelectedDay(currentDay);
18 }18 }
1919
@@ -29,18 +29,15 @@
29 text: new Date(0, 0, 0, 0).toLocaleTimeString(Qt.locale(), i18n.tr("HH"))29 text: new Date(0, 0, 0, 0).toLocaleTimeString(Qt.locale(), i18n.tr("HH"))
30 }30 }
3131
32 Label{
33 id: dummy;text: "SUN";visible: false;fontSize: "large"
34 }
35
36 WeekRibbon{32 WeekRibbon{
37 id: weekRibbon33 id: weekRibbon
38 visibleWeek: currentDay.weekStart(intern.firstDayOfWeek);34 visibleWeek: currentDay.weekStart(Qt.locale().firstDayOfWeek);
39 anchors.top: todayLabel.bottom35 anchors.top: todayLabel.bottom
40 anchors.left: timeLabel.right36 anchors.left: timeLabel.right
41 width: parent.width - timeLabel.width37 width: parent.width
42 height: units.gu(10)38 height: units.gu(10)
43 weekWidth: dummy.width + units.gu(1)39 //removing timeLabel.width from front and back of ribbon
40 weekWidth: ((width - 2* timeLabel.width )/ 7 )
4441
45 onWeekChanged: {42 onWeekChanged: {
46 currentDay = visibleWeek43 currentDay = visibleWeek
@@ -59,7 +56,6 @@
5956
60 QtObject{57 QtObject{
61 id: intern58 id: intern
62 property int firstDayOfWeek: Qt.locale().firstDayOfWeek
63 property var startDay: weekViewPath.visibleDay.addDays(-1)59 property var startDay: weekViewPath.visibleDay.addDays(-1)
64 }60 }
6561
@@ -89,7 +85,7 @@
8985
90 width: parent.width86 width: parent.width
91 height: parent.height87 height: parent.height
92 weekWidth: dummy.width + units.gu(1)88 weekWidth: weekRibbon.weekWidth
93 day: getStartDay();89 day: getStartDay();
9490
95 function getStartDay() {91 function getStartDay() {
9692
=== modified file 'WeekRibbon.qml'
--- WeekRibbon.qml 2013-08-17 03:29:15 +0000
+++ WeekRibbon.qml 2013-09-03 15:16:52 +0000
@@ -16,7 +16,6 @@
16 QtObject{16 QtObject{
17 id: intern17 id: intern
18 property var now: new Date();18 property var now: new Date();
19 property int weekstartDay: Qt.locale().firstDayOfWeek
20 property var weekStart: visibleWeek.addDays(-7)19 property var weekStart: visibleWeek.addDays(-7)
21 property var selectedDate: visibleWeek20 property var selectedDate: visibleWeek
22 }21 }
@@ -38,7 +37,7 @@
38 }37 }
3938
40 function nextWeek() {39 function nextWeek() {
41 var weekStartDay= visibleWeek.weekStart(intern.weekstartDay);40 var weekStartDay= visibleWeek.weekStart(Qt.locale().firstDayOfWeek);
42 visibleWeek = weekStartDay.addDays(7);41 visibleWeek = weekStartDay.addDays(7);
43 setSelectedDay();42 setSelectedDay();
4443
@@ -46,7 +45,7 @@
46 }45 }
4746
48 function previousWeek(){47 function previousWeek(){
49 var weekStartDay = visibleWeek.weekStart(intern.weekstartDay);48 var weekStartDay = visibleWeek.weekStart(Qt.locale().firstDayOfWeek);
50 visibleWeek = weekStartDay.addDays(-7);49 visibleWeek = weekStartDay.addDays(-7);
51 setSelectedDay();50 setSelectedDay();
5251
@@ -60,7 +59,7 @@
60 return;59 return;
61 }60 }
6261
63 if( intern.now.weekStart(intern.weekstartDay).isSameDay(visibleWeek) ) {62 if( intern.now.weekStart(Qt.locale().firstDayOfWeek).isSameDay(visibleWeek) ) {
64 intern.selectedDate = intern.now63 intern.selectedDate = intern.now
65 } else {64 } else {
66 intern.selectedDate = visibleWeek65 intern.selectedDate = visibleWeek
@@ -113,7 +112,7 @@
113 id: column112 id: column
114 width: weekWidth113 width: weekWidth
115 Label{114 Label{
116 text: Qt.locale().standaloneDayName(( intern.weekstartDay + index), Locale.ShortFormat)115 text: Qt.locale().standaloneDayName(( Qt.locale().firstDayOfWeek + index), Locale.ShortFormat)
117 horizontalAlignment: Text.AlignHCenter116 horizontalAlignment: Text.AlignHCenter
118 width: column.width117 width: column.width
119 fontSize: "medium"118 fontSize: "medium"

Subscribers

People subscribed via source and target branches

to status/vote changes: