diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2019-05-02 10:26:48 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2019-05-11 09:47:36 +0000 |
commit | 3fff03048a48aa7ead6e888165b2ae5a118d675c (patch) | |
tree | d6e60af26d6c562a893cdff294256cf89c86ace8 /src/quick/util | |
parent | e5255809b5adbe3c837cc1ece18f63054e0d53b5 (diff) |
QQuickTableView: change implementation of enforceTableAtOrigin()
We set the size of the content view to be the size of the complete
table. The problem is that the exact size will always be just
a prediction, since we would otherwise need to iterate over all rows
and column up front, to be able calculate the exact size.
This is not acceptable when using non-trival table models.
A side effect of this, is that is will be possible to flick the
viewport further out than the actual end of the table, if the
content view turns out to be larger than the table itself. From
before we used to just move the whole table back into the viewport
when that happened, which could be seen as a sudden jump of the
table to a new position.
This change will improve this logic so that we can avoid most
visual jumps. Instead of moving the table around, QQuickFlickable
supports moving the origin instead. So when we see that the
table is not in sync with the content view, we simple move the
origin to the edge of the table. The effect is that any flicking
or ongoing momentum animation in QQuickFlickable will continue as
if nothing happened. This is also the same logic used by QQuickListView.
Change-Id: I6060b7e84b9489c8fa569e6ff41b958e3871f8e7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/util')
0 files changed, 0 insertions, 0 deletions