From 3ecfa34824d0842f21c925150afd1ec2b62630c0 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 15 Jul 2025 01:11:48 +0800 Subject: timedate: animated time --- bar/TimeDate.qml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'bar/TimeDate.qml') diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml index 1a952c7..6ef8596 100644 --- a/bar/TimeDate.qml +++ b/bar/TimeDate.qml @@ -34,8 +34,28 @@ Item { text: Icons.resource.clock font.pixelSize: Style.font.size.larger } - IText { - text: Services.TimeDate.time + RowLayout { + property int h: Services.TimeDate.hours + property int m: Services.TimeDate.minutes + property int s: Services.TimeDate.seconds + spacing: 0 + IText { + text: (parent.h > 10 ? "" : "0") + parent.h + } + IText { + text: ":" + } + IText { + animate: true + text: (parent.m > 10 ? "" : "0") + parent.m + } + IText { + text: ":" + } + IText { + animate: true + text: (parent.s > 10 ? "" : "0") + parent.s + } } Item { Layout.fillWidth: true -- cgit v1.2.3