diff --git a/lookandfeel/contents/components/Clock.qml b/lookandfeel/contents/components/Clock.qml --- a/lookandfeel/contents/components/Clock.qml +++ b/lookandfeel/contents/components/Clock.qml @@ -19,28 +19,46 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 +import QtGraphicalEffects 1.0 import org.kde.plasma.core 2.0 import org.kde.plasma.components 2.0 -ColumnLayout { - Label { - text: Qt.formatTime(timeSource.data["Local"]["DateTime"]) - font.pointSize: 48 //Mockup says this, I'm not sure what to do? - font.weight: Font.Light - Layout.alignment: Qt.AlignHCenter - renderType: Text.QtRendering - } - Label { - text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate) - font.pointSize: 24 - font.weight: Font.Light - Layout.alignment: Qt.AlignHCenter +Item { + width: clock.implicitWidth + height: clock.implicitHeight + + DropShadow { + id: clockShadow + anchors.fill: clock + source: clock + horizontalOffset: 0 + verticalOffset: 2 + radius: 14 + samples: 32 + spread: 0.3 + color: ColorScope.backgroundColor } - DataSource { - id: timeSource - engine: "time" - connectedSources: ["Local"] - interval: 1000 + + ColumnLayout { + id: clock + Label { + text: Qt.formatTime(timeSource.data["Local"]["DateTime"]) + font.pointSize: 48 + font.weight: Font.Light + Layout.alignment: Qt.AlignHCenter + } + Label { + text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate) + font.pointSize: 24 + font.weight: Font.Light + Layout.alignment: Qt.AlignHCenter + } + DataSource { + id: timeSource + engine: "time" + connectedSources: ["Local"] + interval: 1000 + } } } 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 @@ -19,6 +19,7 @@ */ import QtQuick 2.8 +import QtGraphicalEffects 1.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents @@ -46,6 +47,18 @@ } } + // Draw a translucent background circle under the user picture + Rectangle { + anchors.centerIn: imageSource + + width: imageSource.width + 2 + height: width + radius: width / 2 + + color: PlasmaCore.ColorScope.backgroundColor + opacity: 0.9 + } + Item { id: imageSource anchors.horizontalCenter: parent.horizontalCenter @@ -131,7 +144,17 @@ } - + DropShadow { + id: labelShadow + anchors.fill: usernameDelegate + source: usernameDelegate + horizontalOffset: 0 + verticalOffset: 1 + radius: 12 + samples: 32 + spread: 0.35 + color: PlasmaCore.ColorScope.backgroundColor + } PlasmaComponents.Label { id: usernameDelegate anchors { diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml --- a/lookandfeel/contents/lockscreen/LockScreenUi.qml +++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml @@ -161,24 +161,6 @@ clock: clock } - DropShadow { - id: clockShadow - anchors.fill: clock - source: clock - horizontalOffset: 0 - verticalOffset: 1 - radius: 12 - samples: 32 - spread: 0.2 - color: Qt.rgba(0, 0, 0, 1) - Behavior on opacity { - OpacityAnimator { - duration: 1000 - easing.type: Easing.InOutQuad - } - } - } - Clock { id: clock property Item shadow: clockShadow diff --git a/sddm-theme/Clock.qml b/sddm-theme/Clock.qml --- a/sddm-theme/Clock.qml +++ b/sddm-theme/Clock.qml @@ -19,25 +19,46 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 +import QtGraphicalEffects 1.0 import org.kde.plasma.core 2.0 import org.kde.plasma.components 2.0 -ColumnLayout { - Label { - text: Qt.formatTime(timeSource.data["Local"]["DateTime"]) - font.pointSize: 32 //Mockup says this, I'm not sure what to do? - Layout.alignment: Qt.AlignHCenter - } - Label { - text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate) - font.pointSize: 18 - Layout.alignment: Qt.AlignHCenter +Item { + width: clock.implicitWidth + height: clock.implicitHeight + + DropShadow { + id: clockShadow + anchors.fill: clock + source: clock + horizontalOffset: 0 + verticalOffset: 2 + radius: 14 + samples: 32 + spread: 0.3 + color: ColorScope.backgroundColor } - DataSource { - id: timeSource - engine: "time" - connectedSources: ["Local"] - interval: 1000 + + ColumnLayout { + id: clock + Label { + text: Qt.formatTime(timeSource.data["Local"]["DateTime"]) + font.pointSize: 48 + font.weight: Font.Light + Layout.alignment: Qt.AlignHCenter + } + Label { + text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate) + font.pointSize: 24 + font.weight: Font.Light + Layout.alignment: Qt.AlignHCenter + } + DataSource { + id: timeSource + engine: "time" + connectedSources: ["Local"] + interval: 1000 + } } } diff --git a/sddm-theme/Main.qml b/sddm-theme/Main.qml --- a/sddm-theme/Main.qml +++ b/sddm-theme/Main.qml @@ -110,28 +110,9 @@ clock: clock } - DropShadow { - id: clockShadow - anchors.fill: clock - source: clock - horizontalOffset: 0 - verticalOffset: 1 - radius: 12 - samples: 32 - spread: 0.2 - color: Qt.rgba(0, 0, 0, 1) - Behavior on opacity { - OpacityAnimator { - duration: 1000 - easing.type: Easing.InOutQuad - } - } - } - Clock { id: clock visible: y > 0 - property Item shadow: clockShadow y: (userListComponent.userList.y + mainStack.y)/2 - height/2 anchors.horizontalCenter: parent.horizontalCenter }