[plasma/plasma-desktop/Plasma/6.7] kcms/landingpage/ui: kcms/landingpage: Fix color bleed through at the corners
Nate Graham <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 673db0ad5fda26d77fd09d3804fb6492fa7cfbbf by Nate Graham. Committed on 07/08/2026 at 14:12. Pushed by ngraham into branch 'Plasma/6.7'. kcms/landingpage: Fix color bleed through at the corners Both the main shadow rectangle and the indicator have antialiased corners which produce pixels with alpha != 1, leading to the highlight color bleeding through. To prevent this use an additional rectangle to paint the border of the image. The color of the shadowed rectangle is now also the shadow color to improve the transition from content to shadow. BUG:522042 (cherry picked from commit 8928344342ea2c2f217cce2e85207b2cfed27ad0) Co-authored-by: David Redondo <[email protected]> M +17 -8 kcms/landingpage/ui/LookAndFeelBox.qml https://invent.kde.org/plasma/plasma-desktop/-/commit/673db0ad5fda26d77fd09d3804fb6492fa7cfbbf diff --git a/kcms/landingpage/ui/LookAndFeelBox.qml b/kcms/landingpage/ui/LookAndFeelBox.qml index f07b06f133..fbfbe09008 100644 --- a/kcms/landingpage/ui/LookAndFeelBox.qml +++ b/kcms/landingpage/ui/LookAndFeelBox.qml @@ -62,16 +62,25 @@ Column { } background: Kirigami.ShadowedRectangle { - color: { - if (button.checked) { - return Kirigami.Theme.highlightColor; - } else if (button.hovered) { - return Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5); - } else { - return Kirigami.Theme.backgroundColor + Rectangle { + width: root.implicitButtonWidth + height: root.implicitButtonHeight + topLeftRadius: parent.radius + bottomLeftRadius: parent.radius + topRightRadius: indicator.visible ? 0 : parent.radius; + bottomRightRadius: indicator.visible ? 0 : parent.radius + color: { + if (button.checked) { + return Kirigami.Theme.highlightColor; + } else if (button.hovered) { + return Kirigami.Theme.hoverColor + } else { + return Kirigami.Theme.backgroundColor + } } } + color: shadow.color radius: Kirigami.Units.cornerRadius shadow { @@ -110,7 +119,7 @@ Column { if (indicator.pressed || indicator.popup?.visible) { return Kirigami.Theme.highlightColor; } else if (indicator.hovered || indicator.visualFocus) { - return Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5); + return Kirigami.Theme.hoverColor; } else { return Kirigami.Theme.backgroundColor; }