@@ -54,35 +54,28 @@ AbstractButton {
55 function __showDivider() {
55 function __showDivider() {
56 // if we're not in ListView, always show a thin dividing line at the bottom
56 // if we're not in ListView, always show a thin dividing line at the bottom
57− if (ListView.view !== null) {
57+ var model = null;
58−
58+ if (typeof ListViewWithPageHeader !== 'undefined') {
59− // if we're last item in ListView don't show divider
59+ if (typeof ListViewWithPageHeader.model !== 'undefined') {
60− if (index === ListView.view.model.count - 1) return false;
60+ model = ListViewWithPageHeader.model;
62+ } else if (ListView.view !== null) {
63+ model = ListView.view.model;
65+ // if we're last item in ListView don't show divider
66+ if (model && index === model.count - 1) return false;
62 return true;
68 return true;
65− property bool __clippingRequired: ListView.view !== null
66− && ListView.view.section.labelPositioning & ViewSection.CurrentLabelAtStart
68− property real __yPositionRelativeToListView: ListView.view ? y - ListView.view.contentY : y
70 property real __heightToClip: {
71 property real __heightToClip: {
71 // Check this is in position where clipping is needed
72 // Check this is in position where clipping is needed
72− if (__clippingRequired && __yPositionRelativeToListView <= __sectionDelegateHeight
73+ if (typeof ListViewWithPageHeader !== 'undefined') {
73− && __yPositionRelativeToListView > -height) {
74+ if (typeof heightToClip !== 'undefined') {
74− return Math.min(__sectionDelegateHeight - __yPositionRelativeToListView, height);
75+ return heightToClip;
80− property int __sectionDelegateHeight: {
81− if (__clippingRequired && ListView.view.hasOwnProperty("__sectionDelegateHeight")) {
82− return ListView.view.__sectionDelegateHeight;