~timo-jyrinki/ubuntu-calendar-app/revert_213_that_reverted_212

« back to all changes in this revision

Viewing changes to DayView.qml

  • Committer: Tarmac
  • Author(s): Kunal Parmar
  • Date: 2014-03-22 13:56:58 UTC
  • mfrom: (216.1.2 ubuntu-calendar-app)
  • Revision ID: tarmac-20140322135658-ruezigsqbi6icz10
Resolves Bug #1295068,Bug #1294679,

When Week or day tab is selected, view scrolls to current time

When inside week or day view when user changes the week or day, keep current scrolled time. Fixes: https://bugs.launchpad.net/bugs/1294679, https://bugs.launchpad.net/bugs/1295068.

Approved by Mihir Soni, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    objectName: "DayView"
10
10
 
11
11
    property var currentDay: new Date()
 
12
    property bool isCurrentPage: false
12
13
 
13
14
    Column {
14
15
        id: column
77
78
                height: parent.height
78
79
                z: index == dayViewPath.currentIndex ? 2 : 1
79
80
 
 
81
                Connections{
 
82
                    target: root
 
83
                    onIsCurrentPageChanged:{
 
84
                        if(root.isCurrentPage){
 
85
                            timeLineView.scrollToCurrentTime();
 
86
                        }
 
87
                    }
 
88
                }
 
89
 
80
90
                //get contentY value from PathView, if its not current Item
81
91
                Binding{
82
92
                    target: timeLineView