From 6a327acde677ecda9ba9fbe7646ff6866709d14a Mon Sep 17 00:00:00 2001 From: Bohdan Onofriichuk Date: Wed, 12 Nov 2025 22:33:43 +0200 Subject: [PATCH] containments/homescreens/halcyon: port from the clock dataengine --- containments/homescreens/halcyon/qml/Clock.qml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/containments/homescreens/halcyon/qml/Clock.qml b/containments/homescreens/halcyon/qml/Clock.qml index 3275ae30..d1906992 100644 --- a/containments/homescreens/halcyon/qml/Clock.qml +++ b/containments/homescreens/halcyon/qml/Clock.qml @@ -5,7 +5,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls -import org.kde.plasma.plasma5support 2.0 as P5Support +import org.kde.plasma.clock import org.kde.kirigami 2.20 as Kirigami import org.kde.plasma.private.mobileshell as MobileShell @@ -19,7 +19,7 @@ ColumnLayout { spacing: 0 Label { - text: Qt.formatTime(timeSource.data["Local"]["DateTime"], root.is24HourTime ? "h:mm" : "h:mm ap") + text: Qt.formatTime(clockSource.dateTime, root.is24HourTime ? "h:mm" : "h:mm ap") color: "white" style: softwareRendering ? Text.Outline : Text.Normal styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" // no outline, doesn't matter @@ -40,7 +40,7 @@ ColumnLayout { Layout.fillWidth: true horizontalAlignment: Text.AlignLeft - text: Qt.formatDate(timeSource.data["Local"]["DateTime"], "ddd, MMM d") + text: Qt.formatDate(clockSource.dateTime, "ddd, MMM d") color: "white" style: softwareRendering ? Text.Outline : Text.Normal styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" // no outline, doesn't matter @@ -51,12 +51,8 @@ ColumnLayout { layer.effect: MobileShell.TextDropShadow {} } - P5Support.DataSource { - id: timeSource - engine: "time" - connectedSources: ["Local"] - interval: 60000 - intervalAlignment: P5Support.Types.AlignToMinute + Clock { + id: clockSource } }