add library with reading history, progress tracking, and view persistence
This commit is contained in:
15 files changed
+685
-40
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user