Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Candy/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ AllowBadUsernames="false"
Locale=""
## The time and date locale should usually be set in your system settings. Only hard set this if something is not working by default or you want a seperate locale setting in your login screen.

HourFormat="hh:mm A"
HourFormat=""
## Defaults to Locale.ShortFormat - Accepts "long" or a custom string like "hh:mm A". See http://doc.qt.io/qt-5/qml-qtqml-date.html

DateFormat="dddd, d of MMMM"
DateFormat=""
## Defaults to Locale.LongFormat - Accepts "short" or a custom string like "dddd, d 'of' MMMM". See http://doc.qt.io/qt-5/qml-qtqml-date.html

## [Translations]
Expand Down
6 changes: 4 additions & 2 deletions Corners/components/DateTimePanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Column {
font.bold: config.DateIsBold == "true" ? true : false
color: config.DateColor

// A blank DateFormat/TimeFormat in theme.conf means "follow the system
// locale"; Qt would render a blank format as an empty string.
function updateDate() {
text = new Date().toLocaleDateString(Qt.locale(), config.DateFormat)
text = new Date().toLocaleDateString(Qt.locale(), config.DateFormat ? config.DateFormat : Locale.LongFormat)
}
}

Expand All @@ -34,7 +36,7 @@ Column {
color: config.TimeColor

function updateTime() {
text = new Date().toLocaleTimeString(Qt.locale(), config.TimeFormat)
text = new Date().toLocaleTimeString(Qt.locale(), config.TimeFormat ? config.TimeFormat : Locale.ShortFormat)
}
}

Expand Down
4 changes: 2 additions & 2 deletions Corners/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ DateColor="#7c7f93"
DateSize="30"
DateIsBold="false"
DateOpacity="0.8"
DateFormat="dddd, MMMM d"
DateFormat=""

TimeColor="#7c7f93"
TimeSize="60"
TimeIsBold="true"
TimeOpacity="0.8"
TimeFormat="hh:mm AP"
TimeFormat=""