Commit a31e4ce4 authored by Nate Graham's avatar Nate Graham
Browse files

Lock/login themes: stop adjusting shadows based on color scheme

Right now we change the intensity of shadows based on the color scheme's
text color, but with a property called "lightBackground". This indicates
that we wanted to do it based on the background color itself, but did
not or could not, so settled on using the text color as a proxy. However
this is wrong; there is no relationship between the active color
scheme's text color and the color of the background image.

Even if we could or did fix that, it would probably still be wrong,
because using lighter shadows on a genuinely light background would
result in worse contrast and readability, especially if the light
background was very visually busy.

For these reasons, in most other places, we have since settled on the
mantra of "shadows should be black", and this commit makes the lock and
login screens follow that convention as well.

BUG: 449985
FIXED-IN: 5.24.2


(cherry picked from commit 146ef22f)
parent b4d5e587
Pipeline #139171 passed with stage
in 10 minutes and 56 seconds
......@@ -22,7 +22,6 @@ PlasmaCore.ColorScope {
// If we're using software rendering, draw outlines instead of shadows
// See https://bugs.kde.org/show_bug.cgi?id=398317
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
readonly property bool lightBackground: Math.max(PlasmaCore.ColorScope.backgroundColor.r, PlasmaCore.ColorScope.backgroundColor.g, PlasmaCore.ColorScope.backgroundColor.b) > 0.5
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
......@@ -179,12 +178,7 @@ PlasmaCore.ColorScope {
radius: 6
samples: 14
spread: 0.3
// Soften the color a bit so it doesn't look so stark against light backgrounds
color: lockScreenUi.lightBackground ? Qt.rgba(PlasmaCore.ColorScope.backgroundColor.r,
PlasmaCore.ColorScope.backgroundColor.g,
PlasmaCore.ColorScope.backgroundColor.b,
0.6)
: "black" // black matches Breeze window decoration and desktopcontainment
color : "black" // shadows should always be black
Behavior on opacity {
OpacityAnimator {
duration: PlasmaCore.Units.veryLongDuration * 2
......
......@@ -30,7 +30,6 @@ PlasmaCore.ColorScope {
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
readonly property bool lightBackground: Math.max(PlasmaCore.ColorScope.backgroundColor.r, PlasmaCore.ColorScope.backgroundColor.g, PlasmaCore.ColorScope.backgroundColor.b) > 0.5
width: 1600
height: 900
......@@ -124,12 +123,7 @@ PlasmaCore.ColorScope {
radius: 6
samples: 14
spread: 0.3
// Soften the color a bit so it doesn't look so stark against light backgrounds
color: root.lightBackground ? Qt.rgba(PlasmaCore.ColorScope.backgroundColor.r,
PlasmaCore.ColorScope.backgroundColor.g,
PlasmaCore.ColorScope.backgroundColor.b,
0.6)
: "black" // black matches Breeze window decoration and desktopcontainment
color : "black" // shadows should always be black
Behavior on opacity {
OpacityAnimator {
duration: PlasmaCore.Units.veryLongDuration * 2
......@@ -503,12 +497,7 @@ PlasmaCore.ColorScope {
radius: 6
samples: 14
spread: 0.3
// Soften the color a bit so it doesn't look so stark against light backgrounds
color: root.lightBackground ? Qt.rgba(PlasmaCore.ColorScope.backgroundColor.r,
PlasmaCore.ColorScope.backgroundColor.g,
PlasmaCore.ColorScope.backgroundColor.b,
0.6)
: "black" // black matches Breeze window decoration and desktopcontainment
color : "black" // shadows should always be black
opacity: loginScreenRoot.uiVisible ? 0 : 1
Behavior on opacity {
//OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)"
......
Supports Markdown
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