make UI look snappier than it is on (by making loading less noticable)
This commit is contained in:
3 files changed
+38
-2
No files matched your search
+18
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user