Merge lp:~aacid/unity8/enable_height_animation_when_visible into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 365
Merged at revision: 370
Proposed branch: lp:~aacid/unity8/enable_height_animation_when_visible
Merge into: lp:unity8
Diff against target: 38 lines (+9/-1)
2 files modified
Dash/Apps/RunningApplicationsGrid.qml (+5/-1)
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp (+4/-0)
To merge this branch: bzr merge lp:~aacid/unity8/enable_height_animation_when_visible
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Approve
Review via email: mp+188536@code.launchpad.net

Commit message

Only enable the animation when the item is on screen (i.e. !culled)

Description of the change

Not really happy with the change since it assumes RunningApplicationsGrid will be in a LVWPH, which it always is, but ... On the other hand didn't really find a way to make it less ugly.

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote :

It's probably the easiest thing to do indeed... Otherwise we'd need to try and find out whether we're in bounds of the ListView.

Should we maybe check if the item has a "culled" property and only set it then?

review: Needs Information
364. By Albert Astals Cid

fix undefined check

Revision history for this message
Albert Astals Cid (aacid) wrote :

> Should we maybe check if the item has a "culled" property and only set it
> then?

Unfortunately the RunningApplicationsGrid is not the direct children of LVWPH, it's just there through a ListItems.Base and a Loader so it'd be quite a hack to put that in the LVWPH code.

365. By Albert Astals Cid

fixme++

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:363
http://jenkins.qa.ubuntu.com/job/unity8-ci/1190/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy-vm/157
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/1949
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/1962
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-ci/213/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1190
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1190/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-ci/1189
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-vm-saucy/113
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4305
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4305/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1951
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1951/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/1643
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/1661

Click here to trigger a rebuild:
http://s-jenkins:8080/job/unity8-ci/1190/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

OK, this is not working... I'm able to get it to animate with this, when I swipe at a certain speed...

Maybe we should have the Behavior enabled on-demand, when any of the transitions fired? And disable it as soon as it's complete?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:365
http://jenkins.qa.ubuntu.com/job/unity8-ci/1192/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy-vm/163
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/1963
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/1965
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-ci/215
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1192
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1192/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-ci/1191
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-vm-saucy/118
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4311
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4311/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1965
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1965/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/1656
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/1674

Click here to trigger a rebuild:
http://s-jenkins:8080/job/unity8-ci/1192/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Dash/Apps/RunningApplicationsGrid.qml'
2--- Dash/Apps/RunningApplicationsGrid.qml 2013-09-10 22:03:47 +0000
3+++ Dash/Apps/RunningApplicationsGrid.qml 2013-10-01 11:40:34 +0000
4@@ -29,7 +29,11 @@
5 onStageScreenshotsReadyChanged: if (shell.dashShown && shell.stageScreenshotsReady) updateScreenshots();
6 }
7
8- Behavior on height { NumberAnimation { duration: 200; easing.type: Easing.InOutQuad } }
9+ Behavior on height {
10+ // FIXME Rethink how we pass down properties from the LVWPH to the interested parties
11+ enabled: culled === undefined || !culled;
12+ NumberAnimation { duration: 200; easing.type: Easing.InOutQuad }
13+ }
14
15 property bool canEnableTerminationMode: true
16
17
18=== modified file 'plugins/ListViewWithPageHeader/listviewwithpageheader.cpp'
19--- plugins/ListViewWithPageHeader/listviewwithpageheader.cpp 2013-09-27 09:17:06 +0000
20+++ plugins/ListViewWithPageHeader/listviewwithpageheader.cpp 2013-10-01 11:40:34 +0000
21@@ -139,6 +139,9 @@
22 QQuickItemPrivate::get(m_item)->setCulled(culled);
23 if (m_sectionItem)
24 QQuickItemPrivate::get(m_sectionItem)->setCulled(culled);
25+
26+ QQmlContext *itemContext = QQmlEngine::contextForObject(m_item)->parentContext();
27+ itemContext->setContextProperty(QLatin1String("culled"), QVariant::fromValue<bool>(culled));
28 }
29
30 ListViewWithPageHeader::ListViewWithPageHeader()
31@@ -849,6 +852,7 @@
32 QQmlContext *context = QQmlEngine::contextForObject(item)->parentContext();
33 context->setContextProperty(QLatin1String("ListViewWithPageHeader"), this);
34 context->setContextProperty(QLatin1String("heightToClip"), QVariant::fromValue<int>(0));
35+ context->setContextProperty(QLatin1String("culled"), QVariant::fromValue<bool>(false));
36 if (modelIndex == m_asyncRequestedIndex) {
37 createItem(modelIndex, false);
38 refill();

Subscribers

People subscribed via source and target branches