qt: fix broken extent calculations in page change functions in ListViewExt
As noted in e45e98fe, the extents are not calculated correctly here. It is tricky to calculate the extents properly directly in QML, but based on evidence the following seems to be a good estimation:
MinimumY: (originY - topMargin) MinimumX: (originX - leftMargin) MaximumX: (originX + contentWidth - width + rightMargin) MaximumY: (originY + contentHeight - height + bottomMargin)
This applies to flickable based views, too. However, these are only
estimates and not the absolute extents. The ideal approach would be
calling the virtual extent methods in QQuickFlickable:
protected:
virtual qreal minXExtent() const;
virtual qreal minYExtent() const;
virtual qreal maxXExtent() const;
virtual qreal maxYExtent() const;
However, they are protected and not invokable, so it does not seem possible to call them, at least directly in QML side.