on xenial help sign in
Make LVWPH non interactive while on header animation

Otherwise the contentY change fights with the animation also wanting to change contentY Fixes: 1251597, 1355473 Approved by: Michał Sawicz

commit6502d783b489b20157f6fddc4a25b069cab479e9 authorMichał Sawicz <michal.sawicz@canonical.com> dateMon 8 Sep 2014, 14:15 (12 years ago) parent4e322d5542aa52
3 files changed+8−6
plugins/Dash/listviewwithpageheader.cpp+7−4 plugins/Dash/listviewwithpageheader.h+1−1 qml/Dash/GenericScopeView.qml−1
plugins/Dash/listviewwithpageheader.cpp+7−4
@@ -172,7 +172,7 @@ ListViewWithPageHeader::ListViewWithPageHeader()
172172 connect(this, SIGNAL(contentWidthChanged()), this, SLOT(onContentWidthChanged()));
173173 connect(this, SIGNAL(contentHeightChanged()), this, SLOT(onContentHeightChanged()));
174174 connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
175− connect(m_contentYAnimation, SIGNAL(stopped()), this, SLOT(onShowHeaderAnimationFinished()));
175+ connect(m_contentYAnimation, SIGNAL(runningChanged(bool)), this, SLOT(contentYAnimationRunningChanged(bool)));
176176
177177 setFlickableDirection(VerticalFlick);
178178}
@@ -1056,10 +1056,13 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
10561056 m_contentHeightDirty = true;
10571057}
10581058
1059−void ListViewWithPageHeader::onShowHeaderAnimationFinished()
1059+void ListViewWithPageHeader::contentYAnimationRunningChanged(bool running)
10601060{
1061− m_contentHeightDirty = true;
1062− polish();
1061+ setInteractive(!running);
1062+ if (!running) {
1063+ m_contentHeightDirty = true;
1064+ polish();
1065+ }
10631066}
10641067
10651068void ListViewWithPageHeader::itemGeometryChanged(QQuickItem * /*item*/, const QRectF &newGeometry, const QRectF &oldGeometry)
plugins/Dash/listviewwithpageheader.h+1−1
@@ -118,7 +118,7 @@ private Q_SLOTS:
118118 void onContentWidthChanged();
119119 void onHeightChanged();
120120 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
121− void onShowHeaderAnimationFinished();
121+ void contentYAnimationRunningChanged(bool running);
122122
123123private:
124124 class ListItem
qml/Dash/GenericScopeView.qml−1
@@ -151,7 +151,6 @@ FocusScope {
151151 model: scopeView.categories
152152 forceNoClip: subPageLoader.open
153153 pixelAligned: true
154− interactive: !navigationShown
155154
156155 property Item expandedCategoryItem: null
157156