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
1=== modified file 'DayView.qml'
2--- DayView.qml 2013-08-27 14:41:12 +0000
3+++ DayView.qml 2013-09-03 15:16:52 +0000
4@@ -13,7 +13,7 @@
5 property var currentDay: new Date()
6
7 onCurrentDayChanged:{
8- weekRibbon.visibleWeek = currentDay.weekStart(intern.firstDayOfWeek);
9+ weekRibbon.visibleWeek = currentDay.weekStart(Qt.locale().firstDayOfWeek);
10 weekRibbon.setSelectedDay(currentDay);
11 }
12
13@@ -29,18 +29,15 @@
14 text: new Date(0, 0, 0, 0).toLocaleTimeString(Qt.locale(), i18n.tr("HH"))
15 }
16
17- Label{
18- id: dummy;text: "SUN";visible: false;fontSize: "large"
19- }
20-
21 WeekRibbon{
22 id: weekRibbon
23- visibleWeek: currentDay.weekStart(intern.firstDayOfWeek);
24+ visibleWeek: currentDay.weekStart(Qt.locale().firstDayOfWeek);
25 anchors.top: todayLabel.bottom
26 anchors.left: timeLabel.right
27- width: parent.width - timeLabel.width
28+ width: parent.width
29 height: units.gu(10)
30- weekWidth: dummy.width + units.gu(1)
31+ //removing timeLabel.width from front and back of ribbon
32+ weekWidth: ((width - 2* timeLabel.width )/ 7 )
33
34 onWeekChanged: {
35 currentDay = visibleWeek
36@@ -59,7 +56,6 @@
37
38 QtObject{
39 id: intern
40- property int firstDayOfWeek: Qt.locale().firstDayOfWeek
41 property var startDay: weekViewPath.visibleDay.addDays(-1)
42 }
43
44@@ -89,7 +85,7 @@
45
46 width: parent.width
47 height: parent.height
48- weekWidth: dummy.width + units.gu(1)
49+ weekWidth: weekRibbon.weekWidth
50 day: getStartDay();
51
52 function getStartDay() {
53
54=== modified file 'WeekRibbon.qml'
55--- WeekRibbon.qml 2013-08-17 03:29:15 +0000
56+++ WeekRibbon.qml 2013-09-03 15:16:52 +0000
57@@ -16,7 +16,6 @@
58 QtObject{
59 id: intern
60 property var now: new Date();
61- property int weekstartDay: Qt.locale().firstDayOfWeek
62 property var weekStart: visibleWeek.addDays(-7)
63 property var selectedDate: visibleWeek
64 }
65@@ -38,7 +37,7 @@
66 }
67
68 function nextWeek() {
69- var weekStartDay= visibleWeek.weekStart(intern.weekstartDay);
70+ var weekStartDay= visibleWeek.weekStart(Qt.locale().firstDayOfWeek);
71 visibleWeek = weekStartDay.addDays(7);
72 setSelectedDay();
73
74@@ -46,7 +45,7 @@
75 }
76
77 function previousWeek(){
78- var weekStartDay = visibleWeek.weekStart(intern.weekstartDay);
79+ var weekStartDay = visibleWeek.weekStart(Qt.locale().firstDayOfWeek);
80 visibleWeek = weekStartDay.addDays(-7);
81 setSelectedDay();
82
83@@ -60,7 +59,7 @@
84 return;
85 }
86
87- if( intern.now.weekStart(intern.weekstartDay).isSameDay(visibleWeek) ) {
88+ if( intern.now.weekStart(Qt.locale().firstDayOfWeek).isSameDay(visibleWeek) ) {
89 intern.selectedDate = intern.now
90 } else {
91 intern.selectedDate = visibleWeek
92@@ -113,7 +112,7 @@
93 id: column
94 width: weekWidth
95 Label{
96- text: Qt.locale().standaloneDayName(( intern.weekstartDay + index), Locale.ShortFormat)
97+ text: Qt.locale().standaloneDayName(( Qt.locale().firstDayOfWeek + index), Locale.ShortFormat)
98 horizontalAlignment: Text.AlignHCenter
99 width: column.width
100 fontSize: "medium"

Subscribers

People subscribed via source and target branches

to status/vote changes: