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
=== modified file 'EventListModel.qml'
--- EventListModel.qml 2014-09-28 05:25:31 +0000
+++ EventListModel.qml 2015-06-04 14:13:48 +0000
@@ -69,6 +69,7 @@
69 var collections = eventModel.collections;69 var collections = eventModel.collections;
70 for(var i = 0 ; i < collections.length ; ++i) {70 for(var i = 0 ; i < collections.length ; ++i) {
71 var cal = collections[i];71 var cal = collections[i];
72 //print(cal.name + " ---- " + cal.extendedMetaData("collection-readonly"));
72 if( cal.extendedMetaData("collection-type") === "Calendar" ) {73 if( cal.extendedMetaData("collection-type") === "Calendar" ) {
73 cals.push(cal);74 cals.push(cal);
74 }75 }
7576
=== modified file 'HeaderDateComponent.qml'
--- HeaderDateComponent.qml 2015-03-21 16:15:53 +0000
+++ HeaderDateComponent.qml 2015-06-04 14:13:48 +0000
@@ -34,9 +34,20 @@
34 // Signal fired when pressing on the date34 // Signal fired when pressing on the date
35 signal dateSelected(var date)35 signal dateSelected(var date)
3636
37 property bool highlighted: false
38
37 width: dayLabel.paintedWidth39 width: dayLabel.paintedWidth
38 height: dateContainer.height40 height: dateContainer.height
3941
42 Rectangle{
43 id: background
44 color: "transparent"
45 visible: highlighted
46 anchors.fill: parent
47 border.width: units.gu(0.3)
48 border.color: UbuntuColors.orange
49 }
50
40 Column {51 Column {
41 id: dateContainer52 id: dateContainer
42 objectName: "dateContainer"53 objectName: "dateContainer"
4354
=== modified file 'TimeLineBaseComponent.qml'
--- TimeLineBaseComponent.qml 2015-05-18 11:03:07 +0000
+++ TimeLineBaseComponent.qml 2015-06-04 14:13:48 +0000
@@ -63,11 +63,15 @@
63 var today = DateExt.today();63 var today = DateExt.today();
64 var startOfWeek = today.weekStart(Qt.locale().firstDayOfWeek);64 var startOfWeek = today.weekStart(Qt.locale().firstDayOfWeek);
65 var weekDay = today.getDay();65 var weekDay = today.getDay();
66 var diff = weekDay - Qt.locale().firstDayOfWeek
67 diff = diff < 0 ? 6 : diff
6668
67 if( startOfWeek.isSameDay(startDay) && weekDay > 2) {69 print(diff + ", " + Qt.locale().firstDayOfWeek + "--" + weekDay)
68 timeLineView.contentX = (weekDay * timeLineView.delegateWidth); 70 if( startOfWeek.isSameDay(startDay) && diff > 2) {
71 timeLineView.contentX = (diff * timeLineView.delegateWidth);
69 if( timeLineView.contentX > (timeLineView.contentWidth - timeLineView.width) ) {72 if( timeLineView.contentX > (timeLineView.contentWidth - timeLineView.width) ) {
70 timeLineView.contentX = timeLineView.contentWidth - timeLineView.width73 timeLineView.contentX = timeLineView.contentWidth - timeLineView.width
74 print(timeLineView.contentX +"----" + (timeLineView.contentWidth - timeLineView.width) )
71 }75 }
72 } else {76 } else {
73 timeLineView.contentX = 0;77 timeLineView.contentX = 0;
7478
=== modified file 'TimeLineHeaderComponent.qml'
--- TimeLineHeaderComponent.qml 2014-11-29 05:15:13 +0000
+++ TimeLineHeaderComponent.qml 2015-06-04 14:13:48 +0000
@@ -30,20 +30,28 @@
30 property bool isCurrentItem: false30 property bool isCurrentItem: false
31 property var currentDay31 property var currentDay
3232
33 property int highlightedIndex;
34
33 signal dateSelected(var date);35 signal dateSelected(var date);
3436
35 width: parent.width37 width: parent.width
36 height: units.gu(4)38 height: units.gu(4)
3739
40 onStartDayChanged: {
41 highlightedIndex = 0
42 }
43
38 Repeater{44 Repeater{
39 model: type == ViewType.ViewTypeWeek ? 7 : 145 model: type == ViewType.ViewTypeWeek ? 7 : 1
4046
41 delegate: HeaderDateComponent{47 delegate: HeaderDateComponent{
42 date: type == ViewType.ViewTypeWeek ? startDay.addDays(index) : startDay48 date: type == ViewType.ViewTypeWeek ? startDay.addDays(index) : startDay
43 dayFormat: Locale.ShortFormat49 dayFormat: Locale.ShortFormat
50 highlighted: (type == ViewType.ViewTypeWeek) && (highlightedIndex == index)
4451
45 dayColor: {52 dayColor: {
46 if( type == ViewType.ViewTypeWeek && date.isSameDay(DateExt.today())){53 if( type == ViewType.ViewTypeWeek && date.isSameDay(DateExt.today())){
54 header.highlightedIndex = index
47 UbuntuColors.orange55 UbuntuColors.orange
48 } /*else if( type == ViewType.ViewTypeDay && date.isSameDay(currentDay) ) {56 } /*else if( type == ViewType.ViewTypeDay && date.isSameDay(currentDay) ) {
49 UbuntuColors.orange57 UbuntuColors.orange
@@ -56,7 +64,15 @@
56 height: header.height64 height: header.height
5765
58 onDateSelected: {66 onDateSelected: {
59 header.dateSelected(date);67 if( type == ViewType.ViewTypeDay ){
68 header.dateSelected(date);
69 } else {
70 if(highlighted) {
71 header.dateSelected(date);
72 } else {
73 header.highlightedIndex = index
74 }
75 }
60 }76 }
6177
62 Loader{78 Loader{

Subscribers

People subscribed via source and target branches

to status/vote changes: