on xenial help sign in
Use some more memory for scopes

* Keep all the categories around * For the current scope, have all the delegates

commit65e6862b743415a66b08bf185d4c43c2f5f1bd6e authorAlbert Astals <albert.astals@canonical.com> dateTue 26 Aug 2014, 11:44 (12 years ago) parentfa3970a
2 files changed+9−1
qml/Dash/GenericScopeView.qml+8−1 qml/Dash/ScopeListView.qml+1
qml/Dash/GenericScopeView.qml+8−1
@@ -305,6 +305,10 @@ FocusScope {
305305 onHeightChanged: rendererLoader.updateDelegateCreationRange();
306306 onContentHeightChanged: rendererLoader.updateDelegateCreationRange();
307307 }
308+ Connections {
309+ target: scopeView
310+ onIsCurrentChanged: rendererLoader.updateDelegateCreationRange();
311+ }
308312
309313 function updateDelegateCreationRange() {
310314 if (categoryView.moving) {
@@ -321,7 +325,10 @@ FocusScope {
321325 if (item && item.hasOwnProperty("displayMarginBeginning")) {
322326 // TODO do we need item.originY here, test 1300302 once we have a silo
323327 // and we can run it on the phone
324− if (baseItem.y + baseItem.height <= 0) {
328+ if (scopeView.isCurrent) {
329+ item.displayMarginBeginning = 1073741823;
330+ item.displayMarginEnd = 1073741823;
331+ } else if (baseItem.y + baseItem.height <= 0) {
325332 // Not visible (item at top of the list viewport)
326333 item.displayMarginBeginning = -baseItem.height;
327334 item.displayMarginEnd = 0;
qml/Dash/ScopeListView.qml+1
@@ -20,4 +20,5 @@ import Dash 0.1
2020ListViewWithPageHeader {
2121 maximumFlickVelocity: height * 10
2222 flickDeceleration: height * 2
23+ cacheBuffer: Number.MAX_VALUE
2324}