Merge lp:~tpeeters/ubuntu-ui-toolkit/topMargin-bug1572525 into lp:ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1948
Merged at revision: 1946
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/topMargin-bug1572525
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 28 lines (+6/-6)
1 file modified
src/Ubuntu/Components/plugin/ucheader.cpp (+6/-6)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/topMargin-bug1572525
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+292386@code.launchpad.net

Commit message

Update Header.flickable docs.

To post a comment you must log in.
Revision history for this message
Andrea Bernabei (faenil) wrote :

"...and does not reflect the header height."

that is a bit unclear to me...what do you mean? Maybe we can it out? or does it actually add information? The topMargin wasn't reflecting the header height anyway (in the most generic case)

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
1947. By Tim Peeters

clarify docs

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

See inline.

1948. By Tim Peeters

revert --> restore

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Hopefully this will be clear enough...

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/plugin/ucheader.cpp'
2--- src/Ubuntu/Components/plugin/ucheader.cpp 2016-04-11 16:40:01 +0000
3+++ src/Ubuntu/Components/plugin/ucheader.cpp 2016-04-20 15:26:38 +0000
4@@ -165,11 +165,11 @@
5 * }
6 * \endqml
7 *
8- * The topMargin of the flickable will automatically be updated to always match
9- * the height of the header. When changing the flickable, the topMargin of the previous
10- * flickable is set to 0. When the header is invisible because its visible property is
11- * false, or the header has no parent, the flickable topMargin does not reflect the
12- * header height.
13+ * The topMargin of the flickable will automatically be updated by adding the height
14+ * of the header to the current topMargin. When changing the flickable, the topMargin
15+ * of the previous flickable is restored by subtracting the header height from it.
16+ * Making the header invisible has the same effect on the topMargin as unsetting
17+ * the flickable.
18 *
19 * It is permitted to use a ListView as the value of flickable, but this works
20 * well only if the ListView.header property is not set. Alternatively,
21@@ -203,7 +203,7 @@
22 m_previous_header_height = 0;
23 delta -= m_flickable->topMargin() + m_flickable->contentY();
24
25- // revert the flickable content Y.
26+ // restore the flickable content Y.
27 m_flickable->setContentY(m_flickable->contentY() + delta);
28 }
29

Subscribers

People subscribed via source and target branches