Commit 68601675 authored by Filip Fila's avatar Filip Fila 🌆

[sddm-theme] Prevent the logo from leaking in after a fadeout

Summary:
Even when the vendor logo is turned off it can be briefly seen when the login screen changes from the fadeout state back into normal.

Comments in other code say that "OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)" so this patch replaces it with NumberAnimation.

There's also a minor fix included - placing the drop shadow sooner in the hierarchy because it should be drawn underneath an object, not in front of it.

Test Plan:
Reduce the fadeout time to something small and then:

`sddm-greeter --test-mode --theme /usr/share/sddm/themes/breeze`

Reviewers: ngraham, cblack, #plasma, mart

Reviewed By: ngraham, #plasma, mart

Subscribers: mart, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29351
parent 894d5d84
......@@ -411,26 +411,6 @@ PlasmaCore.ColorScope {
}
}
Image {
id: logo
visible: config.showlogo == "shown"
source: config.logo
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: footer.top
anchors.bottomMargin: units.largeSpacing
asynchronous: true
sourceSize.height: height
opacity: loginScreenRoot.uiVisible ? 0 : 1
fillMode: Image.PreserveAspectFit
height: Math.round(units.gridUnit * 3.5)
Behavior on opacity {
OpacityAnimator {
duration: units.longDuration
easing.type: Easing.InOutQuad
}
}
}
DropShadow {
id: logoShadow
anchors.fill: logo
......@@ -444,7 +424,29 @@ PlasmaCore.ColorScope {
color: "black" // matches Breeze window decoration and desktopcontainment
opacity: loginScreenRoot.uiVisible ? 0 : 1
Behavior on opacity {
OpacityAnimator {
//OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)"
NumberAnimation {
duration: units.longDuration
easing.type: Easing.InOutQuad
}
}
}
Image {
id: logo
visible: config.showlogo == "shown"
source: config.logo
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: footer.top
anchors.bottomMargin: units.largeSpacing
asynchronous: true
sourceSize.height: height
opacity: loginScreenRoot.uiVisible ? 0 : 1
fillMode: Image.PreserveAspectFit
height: Math.round(units.gridUnit * 3.5)
Behavior on opacity {
// OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)"
NumberAnimation {
duration: units.longDuration
easing.type: Easing.InOutQuad
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment