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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Andrea Cimitan
Approved revision: 1550
Merged at revision: 1641
Proposed branch: lp:~aacid/unity8/properVRangesCurrentScope
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/properRangesHorizontalCategories
Diff against target: 49 lines (+11/-7)
1 file modified
qml/Dash/GenericScopeView.qml (+11/-7)
To merge this branch: bzr merge lp:~aacid/unity8/properVRangesCurrentScope
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Andrea Cimitan (community) Approve
MichaƂ Sawicz Pending
Review via email: mp+246465@code.launchpad.net

Commit message

Don't precache items that are outisde the 1.5*height buffering area

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
Prerequisite

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1549. By Albert Astals Cid

Merge again

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

qmluitest fixed with the merge of 1549

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1550. By Albert Astals Cid

Merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
yes
 * Did CI run pass? If not, please explain why.
yes
 * Did you make sure that the branch does not contain spurious tags?
yes

review: Approve
1551. By Albert Astals Cid

Merge

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/GenericScopeView.qml'
2--- qml/Dash/GenericScopeView.qml 2015-02-11 17:10:44 +0000
3+++ qml/Dash/GenericScopeView.qml 2015-02-24 14:43:54 +0000
4@@ -401,6 +401,12 @@
5 }
6
7 if (item && item.hasOwnProperty("displayMarginBeginning")) {
8+ var buffer = wasCurrentOnMoveStart ? categoryView.height * 1.5 : 0;
9+ var onViewport = baseItem.y + baseItem.height > 0 &&
10+ baseItem.y < categoryView.height;
11+ var onBufferViewport = baseItem.y + baseItem.height > -buffer &&
12+ baseItem.y < categoryView.height + buffer;
13+
14 if (item.growsVertically) {
15 // A item view creates its delegates synchronously from
16 // -displayMarginBeginning
17@@ -428,7 +434,7 @@
18 displayMarginEnd = -Math.min(-displayMarginEnd, baseItem.height);
19 displayMarginEnd = Math.round(displayMarginEnd);
20
21- if (scopeView.isCurrent || scopeView.visibleToParent) {
22+ if (onBufferViewport && (scopeView.isCurrent || scopeView.visibleToParent)) {
23 item.displayMarginBeginning = displayMarginBeginning;
24 item.displayMarginEnd = displayMarginEnd;
25 if (holdingList && holdingList.moving) {
26@@ -441,7 +447,10 @@
27 item.cacheBuffer = 0;
28 }
29 } else {
30- item.cacheBuffer = categoryView.height * 1.5;
31+ // Protect us against cases where the item hasn't yet been positioned
32+ if (!(categoryView.contentY === 0 && baseItem.y === 0 && index !== 0)) {
33+ item.cacheBuffer = categoryView.height * 1.5;
34+ }
35 }
36 } else {
37 var visibleRange = baseItem.height + displayMarginEnd + displayMarginBeginning;
38@@ -459,11 +468,6 @@
39 }
40 }
41 } else {
42- var buffer = wasCurrentOnMoveStart ? categoryView.height * 1.5 : 0;
43- var onViewport = baseItem.y + baseItem.height > 0 &&
44- baseItem.y < categoryView.height;
45- var onBufferViewport = baseItem.y + baseItem.height > -buffer &&
46- baseItem.y < categoryView.height + buffer;
47 if (!onBufferViewport) {
48 // If not on the buffered viewport, don't load anything
49 item.displayMarginBeginning = 0;

Subscribers

People subscribed via source and target branches