[app] Tweaking look loading UI
This commit is contained in:
parent
cf51192137
commit
a39ad381b0
2 changed files with 10 additions and 1 deletions
|
@ -66,6 +66,7 @@ Item {
|
||||||
property alias viewInteractive: bookView.interactive
|
property alias viewInteractive: bookView.interactive
|
||||||
property alias pullDownMenu: menu
|
property alias pullDownMenu: menu
|
||||||
property alias isCurrentView: menu.visible
|
property alias isCurrentView: menu.visible
|
||||||
|
property alias loadingBackgroundOpacity: loadingBackground.opacity
|
||||||
property bool pageActive
|
property bool pageActive
|
||||||
|
|
||||||
readonly property bool viewActive: pageActive && Qt.application.active && book
|
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 {
|
SilicaListView {
|
||||||
id: bookView
|
id: bookView
|
||||||
|
|
||||||
|
@ -223,7 +231,7 @@ Item {
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
snapMode: ListView.SnapOneItem
|
snapMode: ListView.SnapOneItem
|
||||||
preferredHighlightBegin: 0
|
preferredHighlightBegin: 0
|
||||||
preferredHighlightEnd: width + spacing
|
preferredHighlightEnd: width
|
||||||
highlightRangeMode: ListView.StrictlyEnforceRange
|
highlightRangeMode: ListView.StrictlyEnforceRange
|
||||||
spacing: Theme.paddingMedium
|
spacing: Theme.paddingMedium
|
||||||
opacity: loading ? 0 : 1
|
opacity: loading ? 0 : 1
|
||||||
|
|
|
@ -123,6 +123,7 @@ Page {
|
||||||
isCurrentView: currentView === bookView
|
isCurrentView: currentView === bookView
|
||||||
pageActive: page.pageActive
|
pageActive: page.pageActive
|
||||||
book: Settings.currentBook ? Settings.currentBook : null
|
book: Settings.currentBook ? Settings.currentBook : null
|
||||||
|
loadingBackgroundOpacity: HarbourTheme.opacityOverlay * storageView.opacity
|
||||||
|
|
||||||
onCloseBook: Settings.currentBook = null
|
onCloseBook: Settings.currentBook = null
|
||||||
onVisibleChanged: if (visible) opacity = 1
|
onVisibleChanged: if (visible) opacity = 1
|
||||||
|
|
Loading…
Reference in a new issue