From 563e306225e8435de62000f69e19d4c08ba14882 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 24 Feb 2015 16:45:17 +0100 Subject: [PATCH] a big clock this should become an applet too --- shell/contents/views/Desktop.qml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/shell/contents/views/Desktop.qml b/shell/contents/views/Desktop.qml index 75f4f9e4..1be24b93 100644 --- a/shell/contents/views/Desktop.qml +++ b/shell/contents/views/Desktop.qml @@ -217,6 +217,12 @@ MouseEventListener { anchors.fill: parent } + PlasmaCore.DataSource { + id: timeSource + engine: "time" + connectedSources: ["Local"] + interval: 60 * 1000 + } PlasmaCore.DataSource { id: notificationsSource @@ -317,13 +323,6 @@ MouseEventListener { anchors.fill: parent color: Qt.rgba(0, 0, 0, 0.7) - PlasmaCore.DataSource { - id: timeSource - engine: "time" - connectedSources: ["Local"] - interval: 500 - } - PlasmaCore.IconItem { id: strengthIcon colorGroup: PlasmaCore.ColorScope.colorGroup @@ -438,6 +437,23 @@ MouseEventListener { z: 999 width: homescreen.width height: homescreen.height + + PlasmaComponents.Label { + id: bigClock + anchors { + horizontalCenter: parent.horizontalCenter + top: parent.top + bottom: notificationView.top + } + text: Qt.formatTime(timeSource.data.Local.DateTime, "hh:mm") + color: PlasmaCore.ColorScope.textColor + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + font.pointSize: 40 + style: Text.Raised + styleColor: "black" + } + ListView { id: notificationView spacing: units.smallSpacing