From 96e578bd5178a38a82d7db60204e9716e0a1be76 Mon Sep 17 00:00:00 2001 From: hat3ph <88069788+hat3ph@users.noreply.github.com> Date: Wed, 17 Apr 2024 11:04:45 +0800 Subject: [PATCH] add option to customize date format --- Main.qml | 2 +- README.md | 2 +- theme.conf | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Main.qml b/Main.qml index 4d3c107..f29cc4a 100644 --- a/Main.qml +++ b/Main.qml @@ -229,7 +229,7 @@ Rectangle { id: date anchors.horizontalCenter: parent.horizontalCenter color: clock.color - text : Qt.formatDate(clock.dateTime, Qt.DefaultLocaleLongDate) + text : Qt.formatDate(clock.dateTime, config.dateFormat || "dddd, dd MMMM yyyy") font.family: textFont.name font.pointSize: config.dateFontSize } diff --git a/README.md b/README.md index c30cdad..fa048db 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You can change a few settings in this file - `bgVidDay` and `bgImgNight` - video day/night playlists - `displayFont` - font - `clockFontSize`, `dateFontSize`, `labelFontSize`, `errorMsgFontSize` and `languageBoxFontSize` - customize font size -- `timeFormat` - customize time format +- `dateFormat` and `timeFormat` - customize [date and time](https://doc.qt.io/qt-5/qml-qtqml-date.html) format - `showLoginButton` - if set to false will hide the login button - `showClearPasswordButton` - if set to false will hide the clear password button that appears when text is inputed - `passwordLeftMargin` and `usernameLeftMargin` - set margin between input boxes and labels, some fonts are messy and allows fixing of overlap diff --git a/theme.conf b/theme.conf index b87be23..b4f3cf4 100644 --- a/theme.conf +++ b/theme.conf @@ -12,6 +12,7 @@ labelFontSize="16" errorMsgFontSize="12" languageBoxFontSize="14" timeFormat="hh:mm" +dateFormat="dddd, dd MMMM yyyy" showLoginButton=true passwordLeftMargin=15 usernameLeftMargin=15