Simplify startup and improve its animation

- Remove Python.loadingAccounts/willLoadAccounts
- Fix HPage SwipeView bug that caused its inner SidePane to steal focus

- Use overshoot for animation
- Get rid of sidepane flickering
- Set default HNumberAnimation easing.type to OutQuad, specify InOutQuad
  for HCheckBox
This commit is contained in:
miruka
2019-08-17 13:35:43 -04:00
parent 1ab79347e9
commit 72b5954ce3
8 changed files with 39 additions and 40 deletions

View File

@@ -30,7 +30,12 @@ CheckBox {
visible: scale > 0
scale: box.checked ? 1 : 0
Behavior on scale { HNumberAnimation { overshoot: 4 } }
Behavior on scale {
HNumberAnimation {
overshoot: 4
easing.type: Easing.InOutBack
}
}
}
}

View File

@@ -1,10 +1,10 @@
import QtQuick 2.12
NumberAnimation {
property real factor: Math.max(overshoot / 1.75, 1.0)
property real factor: 1.0
property real overshoot: 1.0
duration: theme.animationDuration * factor
easing.type: overshoot > 1 ? Easing.InOutBack : Easing.Linear
duration: theme.animationDuration * Math.max(overshoot / 1.7, 1.0) * factor
easing.type: overshoot > 1 ? Easing.OutBack : Easing.Linear
easing.overshoot: overshoot
}

View File

@@ -18,12 +18,13 @@ SwipeView {
Math.min(theme.spacing * width / 400, theme.spacing)
id: swipeView
currentIndex: 1
clip: true
interactive: sidePane.reduce
currentIndex: 1
SidePane {
implicitWidth: swipeView.width
animateWidth: false // Without this, the SidePane gets auto-focused
collapse: false
reduce: false
visible: swipeView.interactive