[app] Tweaked book opening and closing animations
This commit is contained in:
parent
c430b8cf69
commit
da9f682081
3 changed files with 11 additions and 6 deletions
|
@ -63,7 +63,7 @@ Item {
|
||||||
{ pager: true, page: true, title: true, tools: true }
|
{ pager: true, page: true, title: true, tools: true }
|
||||||
]
|
]
|
||||||
|
|
||||||
property alias viewInteractive: bookView.interactive
|
property bool viewInteractive: bookView.interactive && !loading
|
||||||
property alias pullDownMenu: menu
|
property alias pullDownMenu: menu
|
||||||
property alias loadingBackgroundOpacity: loadingBackground.opacity
|
property alias loadingBackgroundOpacity: loadingBackground.opacity
|
||||||
property bool isCurrentView
|
property bool isCurrentView
|
||||||
|
@ -147,7 +147,7 @@ Item {
|
||||||
PullDownMenu {
|
PullDownMenu {
|
||||||
id: menu
|
id: menu
|
||||||
|
|
||||||
visible: isCurrentView && Settings.bookPullDownMenu
|
visible: isCurrentView && !loading && Settings.bookPullDownMenu
|
||||||
|
|
||||||
property real backToLibrary
|
property real backToLibrary
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2020 Jolla Ltd.
|
Copyright (C) 2015-2021 Jolla Ltd.
|
||||||
Copyright (C) 2015-2020 Slava Monich <slava.monich@jolla.com>
|
Copyright (C) 2015-2021 Slava Monich <slava.monich@jolla.com>
|
||||||
|
|
||||||
You may use this file under the terms of BSD license as follows:
|
You may use this file under the terms of BSD license as follows:
|
||||||
|
|
||||||
|
@ -85,6 +85,7 @@ Page {
|
||||||
width: page.width
|
width: page.width
|
||||||
height: page.height
|
height: page.height
|
||||||
y: Settings.currentBook ? flickable.contentY : 0
|
y: Settings.currentBook ? flickable.contentY : 0
|
||||||
|
viewScale: 0.9 + 0.1 * opacity
|
||||||
pageActive: page.pageActive
|
pageActive: page.pageActive
|
||||||
isCurrentView: currentView === storageView
|
isCurrentView: currentView === storageView
|
||||||
opacity: Settings.currentBook ? ((y > fadeInThreshold) ? 1 : (y > 0) ? y/fadeInThreshold : 0) : 1
|
opacity: Settings.currentBook ? ((y > fadeInThreshold) ? 1 : (y > 0) ? y/fadeInThreshold : 0) : 1
|
||||||
|
@ -139,7 +140,7 @@ Page {
|
||||||
property: "contentY"
|
property: "contentY"
|
||||||
to: page.height
|
to: page.height
|
||||||
duration: 150
|
duration: 150
|
||||||
easing.type: Easing.InQuad
|
easing.type: Easing.Linear
|
||||||
}
|
}
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
script: {
|
script: {
|
||||||
|
|
|
@ -39,6 +39,7 @@ Item {
|
||||||
id: storageView
|
id: storageView
|
||||||
|
|
||||||
property alias viewInteractive: storageList.interactive
|
property alias viewInteractive: storageList.interactive
|
||||||
|
property alias viewScale: storageList.scale
|
||||||
property alias pullDownMenu: menu
|
property alias pullDownMenu: menu
|
||||||
property alias isCurrentView: menu.visible
|
property alias isCurrentView: menu.visible
|
||||||
property bool pageActive
|
property bool pageActive
|
||||||
|
@ -189,7 +190,9 @@ Item {
|
||||||
SilicaListView {
|
SilicaListView {
|
||||||
id: storageList
|
id: storageList
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.centerIn: parent
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
model: storageModel
|
model: storageModel
|
||||||
flickDeceleration: maximumFlickVelocity
|
flickDeceleration: maximumFlickVelocity
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
|
@ -235,6 +238,7 @@ Item {
|
||||||
device: model.device
|
device: model.device
|
||||||
removableStorage: model.removable
|
removableStorage: model.removable
|
||||||
shelfIndex: model.index
|
shelfIndex: model.index
|
||||||
|
view.clip: storageList.scale == 1
|
||||||
onStartEditing: storageView.editMode = true
|
onStartEditing: storageView.editMode = true
|
||||||
onStopEditing: storageView.editMode = false
|
onStopEditing: storageView.editMode = false
|
||||||
onScrollLeft: storageList.scrollOnePageLeft()
|
onScrollLeft: storageList.scrollOnePageLeft()
|
||||||
|
|
Loading…
Reference in a new issue