diff --git a/app/qml/BooksBookView.qml b/app/qml/BooksBookView.qml index a5fc89d..e31fde1 100644 --- a/app/qml/BooksBookView.qml +++ b/app/qml/BooksBookView.qml @@ -66,6 +66,7 @@ Item { property alias viewInteractive: bookView.interactive property alias pullDownMenu: menu property alias isCurrentView: menu.visible + property alias loadingBackgroundOpacity: loadingBackground.opacity property bool pageActive readonly property bool viewActive: pageActive && Qt.application.active && book @@ -214,6 +215,13 @@ Item { } } + Rectangle { + id: loadingBackground + anchors.fill: parent + color: HarbourTheme.invertedPrimaryColor + visible: loading && opacity > 0 + } + SilicaListView { id: bookView @@ -223,7 +231,7 @@ Item { orientation: ListView.Horizontal snapMode: ListView.SnapOneItem preferredHighlightBegin: 0 - preferredHighlightEnd: width + spacing + preferredHighlightEnd: width highlightRangeMode: ListView.StrictlyEnforceRange spacing: Theme.paddingMedium opacity: loading ? 0 : 1 diff --git a/app/qml/BooksMainPage.qml b/app/qml/BooksMainPage.qml index 6634dd4..c9ae8b8 100644 --- a/app/qml/BooksMainPage.qml +++ b/app/qml/BooksMainPage.qml @@ -123,6 +123,7 @@ Page { isCurrentView: currentView === bookView pageActive: page.pageActive book: Settings.currentBook ? Settings.currentBook : null + loadingBackgroundOpacity: HarbourTheme.opacityOverlay * storageView.opacity onCloseBook: Settings.currentBook = null onVisibleChanged: if (visible) opacity = 1