~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml

  • Committer: CI Train Bot
  • Author(s): Christian Dywan, Zsombor Egri, Zoltán Balogh, Tim Peeters, Albert Astals Cid, Michael Sheldon, Benjamin Zeller
  • Date: 2015-12-17 17:13:49 UTC
  • mfrom: (1000.739.27 OTA9-landing-2015-12-16)
  • Revision ID: ci-train-bot@canonical.com-20151217171349-8xwclnhnx8v9oz4m
OTA9-landing-2015-12-16
Approved by: Zoltan Balogh

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import QtQuick 2.4
18
18
import Ubuntu.Components 1.3
19
 
import Ubuntu.Components.Styles 1.2 as Style
 
19
import Ubuntu.Components.Styles 1.3 as Style
20
20
 
21
21
Style.PullToRefreshStyle {
22
22
    id: style
83
83
          will be restored to the default value before the animation, and the content
84
84
          will be pushed under the header. We need to connect to the header changes
85
85
          so we can reset the state and the topMargin.
86
 
          */
 
86
        */
87
87
        if (rootItem && rootItem.__propagated && rootItem.__propagated.header) {
88
88
            rootItem.__propagated.header.visibleChanged.connect(fixTopMargin);
89
89
            rootItem.__propagated.header.heightChanged.connect(fixTopMargin);
90
90
        }
91
91
        ready = true;
92
92
    }
 
93
 
 
94
    Component.onDestruction: {
 
95
        rootItem.__propagated.header.visibleChanged.disconnect(fixTopMargin);
 
96
        rootItem.__propagated.header.heightChanged.disconnect(fixTopMargin);
 
97
    }
 
98
 
93
99
    function fixTopMargin() {
94
100
        if (style.state === "refreshing") {
95
101
            /*