1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 23:42:51 -05:00

Settings globally, refactor some menus

This commit is contained in:
bbedward
2025-07-12 14:33:50 -04:00
parent f61ee93484
commit db05496dca
17 changed files with 1100 additions and 70 deletions

View File

@@ -237,10 +237,11 @@ Rectangle {
if (modelData.allDay) {
return "All day"
} else {
let startTime = Qt.formatTime(modelData.start, "h:mm AP")
let timeFormat = Prefs.use24HourClock ? "H:mm" : "h:mm AP"
let startTime = Qt.formatTime(modelData.start, timeFormat)
if (modelData.start.toDateString() !== modelData.end.toDateString() ||
modelData.start.getTime() !== modelData.end.getTime()) {
return startTime + " " + Qt.formatTime(modelData.end, "h:mm AP")
return startTime + " " + Qt.formatTime(modelData.end, timeFormat)
}
return startTime
}