mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
lockscreen: Remove bottom arrow animation
Wastes battery as it keeps running with the display off
This commit is contained in:
parent
88fd76ac26
commit
d6ec22375b
4 changed files with 4 additions and 35 deletions
|
|
@ -13,37 +13,6 @@ Loader {
|
|||
|
||||
property var lockScreenState
|
||||
|
||||
property real animationY: 0
|
||||
readonly property real fullYOffset: Kirigami.Units.largeSpacing
|
||||
|
||||
// animate it going up and down
|
||||
NumberAnimation on animationY {
|
||||
id: animateUpAndDown
|
||||
duration: 800
|
||||
easing.type: Easing.InCubic
|
||||
to: root.fullYOffset
|
||||
|
||||
// only bounce icon if we are showing the scroll up icon
|
||||
running: !lockScreenState.isFingerprintSupported
|
||||
|
||||
onFinished: {
|
||||
if (root.animationY === root.fullYOffset) {
|
||||
to = 0;
|
||||
easing.type = Easing.OutCubic;
|
||||
} else {
|
||||
to = root.fullYOffset;
|
||||
easing.type = Easing.InCubic;
|
||||
}
|
||||
restart();
|
||||
}
|
||||
|
||||
onStopped: {
|
||||
if (lockScreenState.isFingerprintSupported) {
|
||||
root.animationY = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceComponent: {
|
||||
if (lockScreenState.isFingerprintSupported) {
|
||||
return fingerprintIcon;
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ Rectangle {
|
|||
shadowEnabled: true
|
||||
shadowVerticalOffset: 1
|
||||
shadowOpacity: 0.3
|
||||
shadowColor: button.pressed ? keypadRoot.buttonPressedColor : keypadRoot.dropShadowColor
|
||||
shadowColor: keypadRoot.dropShadowColor
|
||||
}
|
||||
|
||||
onPressedChanged: {
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ Item {
|
|||
lockScreenState: root.lockScreenState
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Kirigami.Units.gridUnit + flickable.position * 0.5 + scrollUpIconLoader.animationY
|
||||
anchors.bottomMargin: Kirigami.Units.gridUnit + flickable.position * 0.5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import QtQml
|
||||
import QtQuick
|
||||
|
||||
import org.kde.kscreenlocker 1.0 as ScreenLocker
|
||||
// import org.kde.kscreenlocker 1.0 as ScreenLocker
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
|
@ -22,7 +22,7 @@ QtObject {
|
|||
property bool passwordless: false // TODO true
|
||||
|
||||
// whether the device can login with fingerprint
|
||||
readonly property bool isFingerprintSupported: authenticator.authenticatorTypes & ScreenLocker.Authenticator.Fingerprint
|
||||
readonly property bool isFingerprintSupported: authenticator.authenticatorTypes //& ScreenLocker.Authenticator.Fingerprint
|
||||
|
||||
signal reset()
|
||||
signal unlockSucceeded()
|
||||
|
|
|
|||
Loading…
Reference in a new issue