on xenial help sign in
Rework the allowedOverlapCase for LVWPH sections
9ae41b6Albert Astals
Components/ListItems/Base.qml+6−1
@@ -68,11 +68,16 @@ AbstractButton {
68 return true;
68 return true;
69 }
69 }
70
70
71+ /* Relevant really only for ListViewWithPageHeader case: specify how many pixels we can overlap with the section header */
72+ readonly property int allowedOverlap: units.dp(1)
73+
71 property real __heightToClip: {
74 property real __heightToClip: {
72 // Check this is in position where clipping is needed
75 // Check this is in position where clipping is needed
73 if (typeof ListViewWithPageHeader !== 'undefined') {
76 if (typeof ListViewWithPageHeader !== 'undefined') {
74 if (typeof heightToClip !== 'undefined') {
77 if (typeof heightToClip !== 'undefined') {
78+ if (heightToClip >= allowedOverlap) {
75− return heightToClip;
79+ return heightToClip - allowedOverlap;
80+ }
76 }
81 }
77 }
82 }
78 return 0;
83 return 0;
Components/ListItems/Header.qml−6
@@ -25,12 +25,6 @@ Item {
25 */
25 */
26 property alias text: label.text
26 property alias text: label.text
27
27
28− /* When this header is used in a ListViewWithPageHeader with CurrentLabelAtStart mode, to stop
29− the list's delegates contents being visible through this header, they clip themselves
30− depending on their position. However to allow delegates underlap the bottom X pixels of this
31− header (so delegate appears through ThinDivider say) we set an offset property here. */
32− readonly property int bottomBorderAllowedOverlap: bottomBorder.allowedBottomOverlap
33−
34 height: units.gu(4.5)
28 height: units.gu(4.5)
35
29
36 Item {
30 Item {
Components/ListItems/ThinDivider.qml−4
@@ -23,9 +23,5 @@ Image {
23 }
23 }
24 height: (visible) ? units.dp(2) : 0
24 height: (visible) ? units.dp(2) : 0
25
25
26− /* Relevant really only for ListViewWithPageHeader with Base delegates: should this image
27− be overlapping content, specify how many pixels from the bottom should be transparent */
28− readonly property int allowedBottomOverlap: units.dp(1)
29−
30 source: "graphics/ListItemDividerHorizontal.png"
26 source: "graphics/ListItemDividerHorizontal.png"
31}
27}