From 2e995183bc2b9e0a82ddeb5dff65f8ea7ae45626 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Fri, 28 Oct 2022 08:16:13 -0600 Subject: [PATCH] Decoration: make outline more outliney The current outline is so subtle as to be almost invisible even with Breeze Dark, and actually invisible (by design) on Breeze Light. Thus it doesn't serve its purpose of being an outline that well. This commit makes it more contrasty, so that it's an actual outline more of the time. --- kdecoration/breezedecoration.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/kdecoration/breezedecoration.cpp b/kdecoration/breezedecoration.cpp index 36e8beff..d6d566f6 100644 --- a/kdecoration/breezedecoration.cpp +++ b/kdecoration/breezedecoration.cpp @@ -759,16 +759,7 @@ void Decoration::updateShadow() outlineColor.hslSaturationF(), qBound(0.1, outlineColor.lightnessF(), 1.0), s->isAlphaChannelSupported() ? 0.9 : 1.0); - // If outlinecolor is very close to the window backgroundcolor, the shadow coloring should be enough, - // so we use the background color as the outline as well. - // This is only checked for very light colors, like the default Breeze Light (#e5e6e7) - // If not, we just modify the lightness like usual - if (!lookupShadowParams(m_internalSettings->shadowSize()).isNone() && backgroundColor.lightnessF() >= 0.85 - && (backgroundColor.lightnessF() - outlineColor.lightnessF()) <= 0.05f) { - outlineColor = backgroundColor; - } else { - outlineColor.lightnessF() >= 0.5 ? outlineColor = outlineColor.darker(130) : outlineColor = outlineColor.lighter(130); - } + outlineColor.lightnessF() >= 0.5 ? outlineColor = outlineColor.darker(170) : outlineColor = outlineColor.lighter(170); // Animated case, no cached shadow object if ((m_shadowAnimation->state() == QAbstractAnimation::Running) && (m_shadowOpacity != 0.0) && (m_shadowOpacity != 1.0)) {