fixed pagination

This commit is contained in:
Agel committed 2026-03-19 23:00:10 +01:00
1 parent 43e75d3d8f
commit 10f0fc52c7
3 files changed
+8 -4

No files matched your search

+2 -1
View File
@@ -42,7 +42,7 @@ public:
// Called from QML on resize
Q_INVOKABLE void setViewportSize(qreal width, qreal height);
// Called from QML on every scroll (real-time)
Q_INVOKABLE void setScrollInfo(int topChunkIndex, qreal offsetInChunk);
Q_INVOKABLE void setScrollInfo(int topChunkIndex, qreal offsetInChunk, bool atYEnd = false);
Q_INVOKABLE void nextChapter();
Q_INVOKABLE void previousChapter();
@@ -73,6 +73,7 @@ private:
QVector<qreal> m_chunkHeights; // rendered height of each chunk
QVector<qreal> m_chunkOffsets; // prefix sums: offset[i] = sum of heights[0..i-1]
qreal m_totalContentHeight = 0;
bool m_atYEnd = false;
QString m_chapterTitle;
};