diff --git a/lookandfeel/contents/components/ActionButton.qml b/lookandfeel/contents/components/ActionButton.qml --- a/lookandfeel/contents/components/ActionButton.qml +++ b/lookandfeel/contents/components/ActionButton.qml @@ -18,11 +18,17 @@ */ import QtQuick 2.2 +import QtGraphicalEffects 1.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents Item { id: root + + // 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 + property alias text: label.text property alias iconSource: icon.source property alias containsMouse: mouseArea.containsMouse @@ -48,6 +54,20 @@ colorGroup: PlasmaCore.ColorScope.colorGroup active: mouseArea.containsMouse || root.activeFocus } + + DropShadow { + id: labelShadow + visible: !softwareRendering + anchors.fill: label + source: label + horizontalOffset: 1 + verticalOffset: 1 + radius: 4 + samples: 9 + spread: 0.35 + color: "black" // the same settings as desktop containment + } // shadow must be rendered before Label, otherwise it ends up on top + PlasmaComponents.Label { id: label anchors { diff --git a/lookandfeel/contents/components/UserDelegate.qml b/lookandfeel/contents/components/UserDelegate.qml --- a/lookandfeel/contents/components/UserDelegate.qml +++ b/lookandfeel/contents/components/UserDelegate.qml @@ -147,6 +147,19 @@ " } + DropShadow { + id: usernameShadow + visible: !softwareRendering + anchors.fill: usernameDelegate + source: usernameDelegate + horizontalOffset: 1 + verticalOffset: 1 + radius: 4 + samples: 9 + spread: 0.35 + color: "black" // the same settings as desktop containment + } // shadow must be rendered before Label, otherwise it ends up on top + PlasmaComponents.Label { id: usernameDelegate anchors { @@ -162,16 +175,6 @@ horizontalAlignment: Text.AlignHCenter //make an indication that this has active focus, this only happens when reached with keyboard navigation font.underline: wrapper.activeFocus - - layer.enabled: !softwareRendering - layer.effect: DropShadow { - horizontalOffset: 0 - verticalOffset: 1 - radius: 12 - samples: 32 - spread: 0.35 - color: ColorScope.backgroundColor - } } MouseArea {