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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1775
Merged at revision: 1817
Proposed branch: lp:~aacid/unity8/margins_contribute_to_display_margin
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/card_height_overlay_header
Diff against target: 46 lines (+8/-3)
2 files modified
qml/Components/ResponsiveVerticalJournal.qml (+7/-2)
qml/Dash/GenericScopeView.qml (+1/-1)
To merge this branch: bzr merge lp:~aacid/unity8/margins_contribute_to_display_margin
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Review via email: mp+258855@code.launchpad.net

Commit message

Take into account the extra margin on top when calculating the display margin

Description of the change

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

 * 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
Michael Zanetti (mzanetti) 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.

waiting

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

yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Components/ResponsiveVerticalJournal.qml'
2--- qml/Components/ResponsiveVerticalJournal.qml 2014-11-07 16:16:12 +0000
3+++ qml/Components/ResponsiveVerticalJournal.qml 2015-05-12 10:19:18 +0000
4@@ -39,6 +39,8 @@
5 +-----+
6 */
7 Item {
8+ id: root
9+
10 property real minimumColumnSpacing: units.gu(1)
11
12 property alias columnWidth: verticalJournalView.columnWidth
13@@ -46,8 +48,8 @@
14 property alias model: verticalJournalView.model
15 property alias delegate: verticalJournalView.delegate
16 property alias cacheBuffer: verticalJournalView.cacheBuffer
17- property alias displayMarginBeginning: verticalJournalView.displayMarginBeginning
18- property alias displayMarginEnd: verticalJournalView.displayMarginEnd
19+ property real displayMarginBeginning: 0
20+ property real displayMarginEnd: 0
21
22 implicitHeight: verticalJournalView.implicitHeight + rowSpacing
23 clip: height < implicitHeight
24@@ -63,6 +65,9 @@
25 bottomMargin: rowSpacing / 2
26 }
27
28+ displayMarginBeginning: -Math.max(-root.displayMarginBeginning - anchors.topMargin, 0)
29+ displayMarginEnd:-Math.max(-root.displayMarginEnd - anchors.topMargin, 0)
30+
31 function px2gu(pixels) {
32 return Math.floor(pixels / units.gu(1))
33 }
34
35=== modified file 'qml/Dash/GenericScopeView.qml'
36--- qml/Dash/GenericScopeView.qml 2015-04-28 08:45:15 +0000
37+++ qml/Dash/GenericScopeView.qml 2015-05-12 10:19:18 +0000
38@@ -425,7 +425,7 @@
39 // to the next, we set the visible range to the viewport so
40 // items are not culled (invisible) but still use no cacheBuffer
41 // (it will be set once the scope is the current one)
42- var displayMarginBeginning = baseItem.y;
43+ var displayMarginBeginning = baseItem.y + rendererLoader.anchors.topMargin;
44 displayMarginBeginning = -Math.max(-displayMarginBeginning, 0);
45 displayMarginBeginning = -Math.min(-displayMarginBeginning, baseItem.height);
46 displayMarginBeginning = Math.round(displayMarginBeginning);

Subscribers

People subscribed via source and target branches