ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #02111
[Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
Kunal Parmar has proposed merging lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app.
Commit message:
Resolves #1432640
First tap set the highlight and then react to tap
Requested reviews:
Ubuntu Calendar Developers (ubuntu-calendar-dev)
For more details, see:
https://code.launchpad.net/~pkunal-parmar/ubuntu-calendar-app/MonthHighlight/+merge/259323
Resolves #1432640
First tap set the highlight and then react to tap
--
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app.
=== modified file 'MonthComponent.qml'
--- MonthComponent.qml 2015-03-05 21:59:16 +0000
+++ MonthComponent.qml 2015-05-17 02:24:48 +0000
@@ -111,6 +111,8 @@
property int dateFontSize: FontUtils.sizeToPixels(root.dateLabelFontSize)
property int dayFontSize: FontUtils.sizeToPixels(root.dayLabelFontSize)
+
+ property int selectedIndex: 0
}
Column{
@@ -216,6 +218,14 @@
isToday: intern.todayDate == date && intern.isCurMonthTodayMonth
+ onIsTodayChanged: {
+ if( isToday ) {
+ intern.selectedIndex = index
+ }
+ }
+
+ isSelected: intern.selectedIndex == index
+
width: parent.dayWidth
height: parent.dayHeight
fontSize: intern.dateFontSize
=== modified file 'MonthComponentDateDelegate.qml'
--- MonthComponentDateDelegate.qml 2014-11-29 09:40:53 +0000
+++ MonthComponentDateDelegate.qml 2015-05-17 02:24:48 +0000
@@ -1,7 +1,7 @@
import QtQuick 2.0
import Ubuntu.Components 1.1
-Item{
+Rectangle{
id: dateRootItem
property int date;
@@ -10,6 +10,12 @@
property bool showEvent;
property alias fontSize: dateLabel.font.pixelSize
+ property bool isSelected: false
+
+ border.width: isSelected ? units.gu(0.3) : 0
+ border.color: UbuntuColors.orange
+ color: "transparent"
+
Loader {
sourceComponent: isToday && isCurrentMonth ? highLightComp : undefined
onSourceComponentChanged: {
@@ -73,16 +79,20 @@
pageStack.push(Qt.resolvedUrl("NewEvent.qml"), {"date":selectedDate, "model":eventModel});
}
onClicked: {
- var selectedDate = new Date(intern.monthStartYear,
- intern.monthStartMonth,
- intern.monthStartDate + index, 0, 0, 0, 0)
- //If monthView is clicked then open selected DayView
- if ( isYearView === false ) {
- root.dateSelected(selectedDate);
- }
- //If yearView is clicked then open selected MonthView
- else {
- root.monthSelected(selectedDate);
+ if( isSelected ) {
+ var selectedDate = new Date(intern.monthStartYear,
+ intern.monthStartMonth,
+ intern.monthStartDate + index, 0, 0, 0, 0)
+ //If monthView is clicked then open selected DayView
+ if ( isYearView === false ) {
+ root.dateSelected(selectedDate);
+ }
+ //If yearView is clicked then open selected MonthView
+ else {
+ root.monthSelected(selectedDate);
+ }
+ } else {
+ intern.selectedIndex = index
}
}
}
Follow ups
-
[Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: noreply, 2015-06-26
-
[Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Alan Pope , 2015-06-26
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Alan Pope , 2015-06-26
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-06-25
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Alan Pope , 2015-06-11
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-06-11
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-05-30
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-05-30
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-05-30
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Nicholas Skaggs, 2015-05-21
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Alan Pope , 2015-05-21
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-05-17
-
Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/MonthHighlight into lp:ubuntu-calendar-app
From: Kunal Parmar, 2015-05-17