From 49eef7abbfbca9f4a36870b226d5c70086f571be Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 14 Jul 2025 19:17:26 +0800 Subject: timedate: use 12 hr fuck qt --- bar/TimeDate.qml | 2 +- services/TimeDate.qml | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml index fe6a5c0..1a952c7 100644 --- a/bar/TimeDate.qml +++ b/bar/TimeDate.qml @@ -28,7 +28,7 @@ Item { Layout.fillWidth: true } anchors.fill: parent - spacing: Bar.resourceIconTextSpacing / 2 + spacing: Bar.resourceIconTextSpacing Icon { text: Icons.resource.clock diff --git a/services/TimeDate.qml b/services/TimeDate.qml index 9c5b8df..ff9343b 100644 --- a/services/TimeDate.qml +++ b/services/TimeDate.qml @@ -5,16 +5,7 @@ import QtQuick Singleton { id: root - readonly property string time: { - // fuck you qt give me my 12 hr time - var h = clock.date.getHours(); - var m = clock.date.getMinutes(); - var s = clock.date.getSeconds(); - h = h % 12; - if (h === 0) - h = 12; - return (h < 10 ? "0" : "") + h + ":" + (m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s; - } + readonly property string time: Qt.formatDateTime(clock.date, "hh:mm:ss") readonly property string date: Qt.formatDateTime(clock.date, "dddd dd/MM") SystemClock { -- cgit v1.2.3