on xenial help sign in
Make LVWPH non interactive while on header animation
6502d78Michał Sawicz
plugins/Dash/listviewwithpageheader.cpp+7−4
@@ -172,7 +172,7 @@ ListViewWithPageHeader::ListViewWithPageHeader()
172 connect(this, SIGNAL(contentWidthChanged()), this, SLOT(onContentWidthChanged()));
172 connect(this, SIGNAL(contentWidthChanged()), this, SLOT(onContentWidthChanged()));
173 connect(this, SIGNAL(contentHeightChanged()), this, SLOT(onContentHeightChanged()));
173 connect(this, SIGNAL(contentHeightChanged()), this, SLOT(onContentHeightChanged()));
174 connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
174 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)));
176
176
177 setFlickableDirection(VerticalFlick);
177 setFlickableDirection(VerticalFlick);
178}
178}
@@ -1056,10 +1056,13 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
1056 m_contentHeightDirty = true;
1056 m_contentHeightDirty = true;
1057}
1057}
1058
1058
1059−void ListViewWithPageHeader::onShowHeaderAnimationFinished()
1059+void ListViewWithPageHeader::contentYAnimationRunningChanged(bool running)
1060{
1060{
1061+ setInteractive(!running);
1062+ if (!running) {
1061− m_contentHeightDirty = true;
1063+ m_contentHeightDirty = true;
1062− polish();
1064+ polish();
1065+ }
1063}
1066}
1064
1067
1065void ListViewWithPageHeader::itemGeometryChanged(QQuickItem * /*item*/, const QRectF &newGeometry, const QRectF &oldGeometry)
1068void ListViewWithPageHeader::itemGeometryChanged(QQuickItem * /*item*/, const QRectF &newGeometry, const QRectF &oldGeometry)
plugins/Dash/listviewwithpageheader.h+1−1
@@ -118,7 +118,7 @@ private Q_SLOTS:
118 void onContentWidthChanged();
118 void onContentWidthChanged();
119 void onHeightChanged();
119 void onHeightChanged();
120 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
120 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
121− void onShowHeaderAnimationFinished();
121+ void contentYAnimationRunningChanged(bool running);
122
122
123private:
123private:
124 class ListItem
124 class ListItem
qml/Dash/GenericScopeView.qml−1
@@ -151,7 +151,6 @@ FocusScope {
151 model: scopeView.categories
151 model: scopeView.categories
152 forceNoClip: subPageLoader.open
152 forceNoClip: subPageLoader.open
153 pixelAligned: true
153 pixelAligned: true
154− interactive: !navigationShown
155
154
156 property Item expandedCategoryItem: null
155 property Item expandedCategoryItem: null
157
156