summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/fx/qfxlistview.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 8dfe171..59ece18 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -212,8 +212,11 @@ public:
qreal startPosition() const {
qreal pos = 0;
- if (!visibleItems.isEmpty())
- pos = visibleItems.first()->position() - visibleIndex * (averageSize + spacing);
+ if (!visibleItems.isEmpty()) {
+ pos = visibleItems.first()->position();
+ if (visibleIndex > 0)
+ pos -= visibleIndex * (averageSize + spacing) - spacing;
+ }
return pos;
}