File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,17 @@ QtObject {
112112 break
113113 case Qt .Key_A :
114114 if (!! Global) {
115- Global .animationEnabled = ! Global .animationEnabled
115+ if (Global .mainView ._statusBar .animationEnabled ) {
116+ Global .mainView ._statusBar .animationEnabled = false
117+ Global .mainView .allowPageAnimations = false
118+ } else {
119+ Global .mainView ._statusBar .animationEnabled = Qt .binding (function () { return BackendConnection .applicationVisible })
120+ Global .mainView .allowPageAnimations = Qt .binding (function () {
121+ return BackendConnection .applicationVisible
122+ && ! Global .mainView ._pageStack .busy && (! Global .mainView .swipeView || ! Global .mainView .swipeView .flicking )
123+ && ! Global .splashScreenVisible
124+ })
125+ }
116126 event .accepted = true
117127 }
118128 break
Original file line number Diff line number Diff line change @@ -23,10 +23,13 @@ Item {
2323 // between pages, or when flicking between the main pages. Note that animations are still
2424 // allowed when dragging between the main pages, as it looks odd if animations stop abruptly
2525 // when the user drags slowly between pages.
26- readonly property bool allowPageAnimations: BackendConnection .applicationVisible
26+ property bool allowPageAnimations: BackendConnection .applicationVisible
2727 && ! pageStack .busy && (! swipeView || ! swipeView .flicking )
2828 && ! Global .splashScreenVisible
29- && Global .animationEnabled
29+
30+ // to allow the mock data simulator to replace the allowPageAnimations binding.
31+ property alias _statusBar: statusBar
32+ property alias _pageStack: pageStack
3033
3134 property int _loadedPages: 0
3235
@@ -340,7 +343,7 @@ Item {
340343 return customButton
341344 }
342345 rightButton: !! root .currentPage ? root .currentPage .topRightButton : VenusOS .StatusBar_RightButton_None
343- animationEnabled: BackendConnection .applicationVisible && ( !! Global ? Global . animationEnabled : true )
346+ animationEnabled: BackendConnection .applicationVisible
344347 color: root .backgroundColor
345348
346349 onLeftButtonClicked: {
You can’t perform that action at this time.
0 commit comments