mirror of
https://github.com/developersu/ClearClock.git
synced 2025-05-14 19:20:26 +03:00
Made 24 hour setting work
This commit is contained in:
parent
4c69469ebe
commit
6ff1f2450e
3 changed files with 6 additions and 3 deletions
|
@ -7,9 +7,9 @@
|
|||
|
||||
<group name="Appearance">
|
||||
<!-- Clock Display Settings -->
|
||||
<entry name="clockUse24hFormat" type="UInt">
|
||||
<entry name="clockUse24hFormat" type="Bool">
|
||||
<label>Force the clock to use 12/24 hour time, instead of following the user locale.</label>
|
||||
<default>1</default>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="clockFontColor" type="Color">
|
||||
<label>Color of text</label>
|
||||
|
|
|
@ -104,6 +104,8 @@ Item {
|
|||
QtControls.CheckBox {
|
||||
id: use24hFormat
|
||||
text: i18n("Use 24-hour clock")
|
||||
tristate: false
|
||||
checked: cfg_clockUse24hFormat
|
||||
}
|
||||
|
||||
QtLayouts.RowLayout {
|
||||
|
|
|
@ -71,7 +71,8 @@ Item {
|
|||
id: clockLabel
|
||||
anchors.centerIn: parent
|
||||
|
||||
text: Qt.formatTime(currentDateTime).replace(":", ".")
|
||||
text: if (plasmoid.configuration.clockUse24hFormat) Qt.formatTime(currentDateTime, "hh.mm")
|
||||
else Qt.formatTime(currentDateTime, "hh.mm AP")
|
||||
|
||||
color: plasmoid.configuration.clockFontColor
|
||||
font.family: if (plasmoid.configuration.clockFontFamily === "ccdefault") fontOutfitBold.name
|
||||
|
|
Loading…
Reference in a new issue