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

Proposed by Kunal Parmar
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 651
Merged at revision: 664
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/WeekViewHighlight
Merge into: lp:ubuntu-calendar-app
Diff against target: 108 lines (+35/-3)
4 files modified
EventListModel.qml (+1/-0)
HeaderDateComponent.qml (+11/-0)
TimeLineBaseComponent.qml (+6/-2)
TimeLineHeaderComponent.qml (+17/-1)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/WeekViewHighlight
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Review via email: mp+259111@code.launchpad.net

Commit message

WeekView highlight day before moving to day view

Description of the change

WeekView highlight day before moving to day view

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
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

LGTM

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
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :
645. By Kunal Parmar

merge from trunk

646. By Kunal Parmar

reset the highlighted index

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)
647. By Kunal Parmar

debug log

648. By Kunal Parmar

debug log

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
649. By Kunal Parmar

merge from trunk

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
650. By Kunal Parmar

AP fix

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
651. By Kunal Parmar

AP fix

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 'EventListModel.qml'
2--- EventListModel.qml 2014-09-28 05:25:31 +0000
3+++ EventListModel.qml 2015-06-04 14:13:48 +0000
4@@ -69,6 +69,7 @@
5 var collections = eventModel.collections;
6 for(var i = 0 ; i < collections.length ; ++i) {
7 var cal = collections[i];
8+ //print(cal.name + " ---- " + cal.extendedMetaData("collection-readonly"));
9 if( cal.extendedMetaData("collection-type") === "Calendar" ) {
10 cals.push(cal);
11 }
12
13=== modified file 'HeaderDateComponent.qml'
14--- HeaderDateComponent.qml 2015-03-21 16:15:53 +0000
15+++ HeaderDateComponent.qml 2015-06-04 14:13:48 +0000
16@@ -34,9 +34,20 @@
17 // Signal fired when pressing on the date
18 signal dateSelected(var date)
19
20+ property bool highlighted: false
21+
22 width: dayLabel.paintedWidth
23 height: dateContainer.height
24
25+ Rectangle{
26+ id: background
27+ color: "transparent"
28+ visible: highlighted
29+ anchors.fill: parent
30+ border.width: units.gu(0.3)
31+ border.color: UbuntuColors.orange
32+ }
33+
34 Column {
35 id: dateContainer
36 objectName: "dateContainer"
37
38=== modified file 'TimeLineBaseComponent.qml'
39--- TimeLineBaseComponent.qml 2015-05-18 11:03:07 +0000
40+++ TimeLineBaseComponent.qml 2015-06-04 14:13:48 +0000
41@@ -63,11 +63,15 @@
42 var today = DateExt.today();
43 var startOfWeek = today.weekStart(Qt.locale().firstDayOfWeek);
44 var weekDay = today.getDay();
45+ var diff = weekDay - Qt.locale().firstDayOfWeek
46+ diff = diff < 0 ? 6 : diff
47
48- if( startOfWeek.isSameDay(startDay) && weekDay > 2) {
49- timeLineView.contentX = (weekDay * timeLineView.delegateWidth);
50+ print(diff + ", " + Qt.locale().firstDayOfWeek + "--" + weekDay)
51+ if( startOfWeek.isSameDay(startDay) && diff > 2) {
52+ timeLineView.contentX = (diff * timeLineView.delegateWidth);
53 if( timeLineView.contentX > (timeLineView.contentWidth - timeLineView.width) ) {
54 timeLineView.contentX = timeLineView.contentWidth - timeLineView.width
55+ print(timeLineView.contentX +"----" + (timeLineView.contentWidth - timeLineView.width) )
56 }
57 } else {
58 timeLineView.contentX = 0;
59
60=== modified file 'TimeLineHeaderComponent.qml'
61--- TimeLineHeaderComponent.qml 2014-11-29 05:15:13 +0000
62+++ TimeLineHeaderComponent.qml 2015-06-04 14:13:48 +0000
63@@ -30,20 +30,28 @@
64 property bool isCurrentItem: false
65 property var currentDay
66
67+ property int highlightedIndex;
68+
69 signal dateSelected(var date);
70
71 width: parent.width
72 height: units.gu(4)
73
74+ onStartDayChanged: {
75+ highlightedIndex = 0
76+ }
77+
78 Repeater{
79 model: type == ViewType.ViewTypeWeek ? 7 : 1
80
81 delegate: HeaderDateComponent{
82 date: type == ViewType.ViewTypeWeek ? startDay.addDays(index) : startDay
83 dayFormat: Locale.ShortFormat
84+ highlighted: (type == ViewType.ViewTypeWeek) && (highlightedIndex == index)
85
86 dayColor: {
87 if( type == ViewType.ViewTypeWeek && date.isSameDay(DateExt.today())){
88+ header.highlightedIndex = index
89 UbuntuColors.orange
90 } /*else if( type == ViewType.ViewTypeDay && date.isSameDay(currentDay) ) {
91 UbuntuColors.orange
92@@ -56,7 +64,15 @@
93 height: header.height
94
95 onDateSelected: {
96- header.dateSelected(date);
97+ if( type == ViewType.ViewTypeDay ){
98+ header.dateSelected(date);
99+ } else {
100+ if(highlighted) {
101+ header.dateSelected(date);
102+ } else {
103+ header.highlightedIndex = index
104+ }
105+ }
106 }
107
108 Loader{

Subscribers

People subscribed via source and target branches

to status/vote changes: