make UI look snappier than it is on (by making loading less noticable)

This commit is contained in:
Agel committed 2026-04-08 16:00:04 +02:00
1 parent a54312a397
commit 503324e7e3
3 files changed
+38 -2

No files matched your search

+18 -1
View File
@@ -23,6 +23,7 @@ ApplicationWindow {
property bool barsVisible: true
// Set to true on the first book open at startup so we restore the last page.
property bool _startupRestore: false
property bool _bookInitializing: false
onCurrentPageChanged: uiState.lastPage = currentPage
@@ -46,6 +47,20 @@ ApplicationWindow {
}
}
Connections {
target: book
function onLoadingChanged() {
if (book.loading) window._bookInitializing = true
}
}
Connections {
target: readingModel
function onMeasuringChanged() {
if (!readingModel.measuring) window._bookInitializing = false
}
}
Timer {
id: geometrySaveTimer
interval: 250
@@ -123,10 +138,12 @@ ApplicationWindow {
BusyIndicator {
anchors.centerIn: parent
running: book.loading || readingModel.measuring
running: window._bookInitializing
visible: running
z: 10
}
}
Loader {