old render cleanup part 1
This commit is contained in:
38 files changed
+166
-1366
No files matched your search
@@ -6,13 +6,7 @@ Rectangle {
|
||||
id: root
|
||||
focus: true
|
||||
|
||||
// Keep the same public interface as ScrollPageView so PageView router delegates uniformly.
|
||||
property bool contentReady: false
|
||||
property bool resizing: false
|
||||
property bool restoreReady: false
|
||||
property int initialIndex: -1
|
||||
property int initialOffset: -1
|
||||
|
||||
property int currentPair: 0
|
||||
|
||||
readonly property bool landscape: width > height
|
||||
@@ -48,7 +42,7 @@ Rectangle {
|
||||
const firstChunk = pair[0]
|
||||
// Keep scroll model in sync so Footer page counter and chapter tracking work.
|
||||
readingModel.setScrollInfo(firstChunk, pairIndex / Math.max(1, readingModel.totalPagePairs - 1))
|
||||
book.saveCurrentPosition(firstChunk, 0, readingModel.pageShift)
|
||||
book.saveCurrentPosition(firstChunk, readingModel.mangaRTL, readingModel.pageShift)
|
||||
}
|
||||
|
||||
// Notify model when orientation changes (triggers pair rebuild).
|
||||
@@ -196,9 +190,11 @@ Rectangle {
|
||||
// Restore position when a new book is loaded.
|
||||
Connections {
|
||||
target: readingModel
|
||||
function onRestoreReady(chunkIndex, intraOffset) {
|
||||
function onRestoreReady(chunkIndex) {
|
||||
contentReady = true
|
||||
restoreReady = true
|
||||
showPair(readingModel.pairIndexForChunk(chunkIndex))
|
||||
}
|
||||
function onScrollToChunkRequested(chunkIndex) {
|
||||
showPair(readingModel.pairIndexForChunk(chunkIndex))
|
||||
}
|
||||
function onTotalPagePairsChanged() {
|
||||
|
||||
Reference in new issue
Block a user