From 3bdbf2ff87d49d8f2bd6c9588e6938660b9a9e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kre=C5=A1imir=20=C4=8Cohar?= Date: Tue, 26 Feb 2019 20:10:21 +0100 Subject: [PATCH] [sddm-theme/lock screen] Render shadows before (and below) labels Test Plan: Before: {F6640823} After: {F6640826} Reviewers: #vdg, ngraham, filipf Reviewed By: #vdg, ngraham Subscribers: plasma-devel Tags: #plasma Maniphest Tasks: T10325 Differential Revision: https://phabricator.kde.org/D19366 --- lookandfeel/contents/components/Clock.qml | 23 +++++++++++-------- .../contents/components/UserDelegate.qml | 23 +++++++++++-------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/lookandfeel/contents/components/Clock.qml b/lookandfeel/contents/components/Clock.qml index 57c07e476..7ebf33a19 100644 --- a/lookandfeel/contents/components/Clock.qml +++ b/lookandfeel/contents/components/Clock.qml @@ -32,6 +32,19 @@ Item { width: clock.implicitWidth height: clock.implicitHeight + DropShadow { + id: clockShadow + visible: !softwareRendering + anchors.fill: clock + source: clock + horizontalOffset: 0 + verticalOffset: 2 + radius: 14 + samples: 32 + spread: 0.3 + color: ColorScope.backgroundColor + } + ColumnLayout { id: clock Label { @@ -55,14 +68,4 @@ Item { interval: 1000 } } - - layer.enabled: !softwareRendering - layer.effect: DropShadow { - horizontalOffset: 0 - verticalOffset: 2 - radius: 14 - samples: 32 - spread: 0.3 - color: ColorScope.backgroundColor - } } diff --git a/lookandfeel/contents/components/UserDelegate.qml b/lookandfeel/contents/components/UserDelegate.qml index 69b8150e8..5e491ffa7 100644 --- a/lookandfeel/contents/components/UserDelegate.qml +++ b/lookandfeel/contents/components/UserDelegate.qml @@ -147,6 +147,19 @@ Item { " } + DropShadow { + id: usernameShadow + visible: !softwareRendering + anchors.fill: usernameDelegate + source: usernameDelegate + horizontalOffset: 0 + verticalOffset: 1 + radius: 12 + samples: 32 + spread: 0.35 + color: ColorScope.backgroundColor + } + PlasmaComponents.Label { id: usernameDelegate anchors { @@ -162,16 +175,6 @@ Item { 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 {