add library with reading history, progress tracking, and view persistence

This commit is contained in:
Agel committed 2026-03-20 11:20:16 +01:00
1 parent c62733bc26
commit c4046d8533
15 files changed
+685 -40

No files matched your search

+4 -1
View File
@@ -58,7 +58,10 @@ double ReadingModel::progress() const
{
if (m_totalChapters == 0)
return 0.0;
return static_cast<double>(m_currentChapter + 1) / m_totalChapters;
double chapterFraction = 0.0;
if (m_totalContentHeight > 0)
chapterFraction = qBound(0.0, m_absoluteScrollY / m_totalContentHeight, 1.0);
return (m_currentChapter + chapterFraction) / m_totalChapters;
}
int ReadingModel::currentPage() const