ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #09373
[Merge] lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_1562657 into lp:ubuntu-calendar-app
Arthur Mello has proposed merging lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_1562657 into lp:ubuntu-calendar-app.
Commit message:
At month view open day view after a single click instead of highlighting date
Requested reviews:
Ubuntu Calendar Developers (ubuntu-calendar-dev)
Related bugs:
Bug #1562657 in Ubuntu Calendar App: "Month view highlights wrong day"
https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1562657
For more details, see:
https://code.launchpad.net/~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_1562657/+merge/293268
At month view open day view after a single click instead of highlighting date
--
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_1562657 into lp:ubuntu-calendar-app.
=== modified file 'MonthComponent.qml'
--- MonthComponent.qml 2016-04-26 19:38:03 +0000
+++ MonthComponent.qml 2016-04-28 13:49:08 +0000
@@ -31,7 +31,6 @@
property int currentMonth;
property var isYearView;
- property var highlightedDate;
property bool displayWeekNumber:false
property bool displayLunarCalendar: false
@@ -46,7 +45,6 @@
signal monthSelected(var date);
signal dateSelected(var date);
- signal dateHighlighted(var date);
function updateEvents(events) {
intern.eventStatus = events
@@ -83,9 +81,6 @@
property int dateFontSize: FontUtils.sizeToPixels(root.dateLabelFontSize)
property int dayFontSize: FontUtils.sizeToPixels(root.dayLabelFontSize)
- property int highlightedIndex: root.isCurrentItem &&
- root.highlightedDate ?
- intern.indexByDate(root.highlightedDate) : -1
property int todayIndex: root.isCurrentItem &&
isCurMonthTodayMonth ?
intern.indexByDate(intern.today) : -1
@@ -115,7 +110,7 @@
id: todayShape
visible: (monthGrid.todayItem != null)
- color: (monthGrid.highlightedItem === monthGrid.todayItem) ? UbuntuColors.darkGrey : UbuntuColors.orange
+ color: UbuntuColors.orange
width: parent ? Math.min(parent.height, parent.width) / 1.3 : 0
height: width
parent: monthGrid.todayItem
@@ -129,24 +124,6 @@
}
}
- UbuntuShape{
- id: highlightedShape
-
- visible: monthGrid.highlightedItem && (monthGrid.highlightedItem != monthGrid.todayItem)
- color: UbuntuColors.darkGrey
- width: parent ? Math.min(parent.height, parent.width) / 1.3 : 0
- height: width
- parent: monthGrid.highlightedItem
- anchors.centerIn: parent
- z: -1
- Rectangle {
- anchors.fill: parent
- anchors.margins: units.gu(0.5)
- color: UbuntuColors.lightGrey
- radius: 5
- }
- }
-
Column{
id: column
@@ -213,10 +190,6 @@
readonly property var todayItem: (intern.todayIndex != -1) &&
(monthGrid.children.length > intern.todayIndex) ?
dateLabelRepeater.itemAt(intern.todayIndex) : null
- readonly property var highlightedItem: (intern.highlightedIndex != -1) &&
- (monthGrid.children.length > intern.highlightedIndex) ?
- dateLabelRepeater.itemAt(intern.highlightedIndex) : null
-
anchors {
left: parent.left
right: parent.right
@@ -248,11 +221,8 @@
onPressAndHold: {
var dayItem = getItemAt(mouse.x, mouse.y)
-
- if( dayItem.isSelected ) {
- var selectedDate = new Date(dayItem.delegateDate.getTime());
- pageStack.push(Qt.resolvedUrl("NewEvent.qml"), {"date":selectedDate, "model":eventModel});
- }
+ var selectedDate = new Date(dayItem.delegateDate.getTime());
+ pageStack.push(Qt.resolvedUrl("NewEvent.qml"), {"date":selectedDate, "model":eventModel});
}
onClicked: {
var dayItem = getItemAt(mouse.x, mouse.y)
@@ -261,12 +231,7 @@
//If yearView is clicked then open selected MonthView
root.monthSelected(selectedDate);
} else {
- if (dayItem.isSelected) {
- //If monthView is clicked then open selected DayView
- root.dateSelected(selectedDate);
- } else {
- root.dateHighlighted(selectedDate)
- }
+ root.dateSelected(selectedDate);
}
}
}
@@ -392,7 +357,6 @@
}
}
isToday: intern.todayDate == date && intern.isCurMonthTodayMonth
- isSelected: intern.highlightedIndex == index
width: monthGrid.dayWidth
height: monthGrid.dayHeight
}
@@ -408,7 +372,6 @@
isCurrentMonth: delegateDate.getMonth() === root.currentMonth
isToday: intern.todayDate == date && intern.isCurMonthTodayMonth
- isSelected: intern.highlightedIndex == index
width: monthGrid.dayWidth
height: monthGrid.dayHeight
}
=== modified file 'MonthView.qml'
--- MonthView.qml 2016-03-17 01:51:25 +0000
+++ MonthView.qml 2016-04-28 13:49:08 +0000
@@ -34,13 +34,11 @@
readonly property var currentDate: monthViewPath.currentItem.indexDate
property var selectedDay;
- property var highlightedDate;
property bool displayLunarCalendar: false
signal dateSelected(var date);
Keys.forwardTo: [monthViewPath]
- createEventAt: highlightedDate ? highlightedDate : currentDate
onAnchorDateChanged: monthViewPath.scrollToBegginer()
Action {
@@ -106,15 +104,11 @@
isCurrentItem: PathView.isCurrentItem
isActive: !monthViewPath.moving && !monthViewPath.flicking
displayWeekNumber: mainView.displayWeekNumber
- highlightedDate: monthViewPage.highlightedDate
isYearView: false
onDateSelected: {
monthViewPage.dateSelected(date);
}
- onDateHighlighted: {
- monthViewPage.highlightedDate = date
- }
}
}
}
=== modified file 'calendar.qml'
--- calendar.qml 2016-03-23 11:58:58 +0000
+++ calendar.qml 2016-04-28 13:49:08 +0000
@@ -659,13 +659,6 @@
tabs.currentDay = currentDate
}
- onHighlightedDateChanged: {
- if (highlightedDate)
- tabs.currentDay = highlightedDate
- else
- tabs.currentDay = currentDate
- }
-
onDateSelected: {
tabs.currentDay = date
tabs.selectedTabIndex = dayTab.index
Follow ups