Fix: Removed useless KeyNavigation and key events. Fixed typos. Cleaned up some code.

This commit is contained in:
Keyitdev
2024-12-30 20:47:31 +01:00
parent 91967fc2d4
commit 8d0c59ded3
8 changed files with 236 additions and 192 deletions
+11 -1
View File
@@ -8,11 +8,15 @@ import QtQuick.Controls 2.15
Column {
id: clock
spacing: 0
width: parent.width / 2
spacing: 0
Label {
id:headerTextLabel
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: root.font.pointSize * 3
color: config.HeaderTextColor
renderType: Text.QtRendering
@@ -21,11 +25,14 @@ Column {
Label {
id: timeLabel
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: root.font.pointSize * 9
font.bold: true
color: config.TimeTextColor
renderType: Text.QtRendering
function updateTime() {
text = new Date().toLocaleTimeString(Qt.locale(config.Locale), config.HourFormat == "long" ? Locale.LongFormat : config.HourFormat !== "" ? config.HourFormat : Locale.ShortFormat)
}
@@ -33,11 +40,14 @@ Column {
Label {
id: dateLabel
anchors.horizontalCenter: parent.horizontalCenter
color: config.DateTextColor
font.pointSize: root.font.pointSize * 2
font.bold: true
renderType: Text.QtRendering
function updateTime() {
text = new Date().toLocaleDateString(Qt.locale(config.Locale), config.DateFormat == "short" ? Locale.ShortFormat : config.DateFormat !== "" ? config.DateFormat : Locale.LongFormat)
}