Changeset View
Changeset View
Standalone View
Standalone View
applets/digital-clock/package/contents/ui/DigitalClock.qml
Context not available. | |||||
38 | return Qt.SystemLocaleLongDate; | 38 | return Qt.SystemLocaleLongDate; | ||
---|---|---|---|---|---|
39 | } else if (plasmoid.configuration.dateFormat === "isoDate") { | 39 | } else if (plasmoid.configuration.dateFormat === "isoDate") { | ||
40 | return Qt.ISODate; | 40 | return Qt.ISODate; | ||
41 | } else if (plasmoid.configuration.dateFormat === "customDate") { | ||||
42 | return 999; | ||||
41 | } | 43 | } | ||
42 | 44 | | |||
43 | return Qt.SystemLocaleShortDate; | 45 | return Qt.SystemLocaleShortDate; | ||
Context not available. | |||||
61 | onDateFormatChanged: { | 63 | onDateFormatChanged: { | ||
62 | setupLabels(); | 64 | setupLabels(); | ||
63 | } | 65 | } | ||
66 | | ||||
67 | onCustomDateFormatChanged: { | ||||
68 | setupLabels(); | ||||
69 | } | ||||
64 | 70 | | |||
65 | onDisplayTimezoneAsCodeChanged: { setupLabels(); } | 71 | onDisplayTimezoneAsCodeChanged: { setupLabels(); } | ||
66 | onStateChanged: { setupLabels(); } | 72 | onStateChanged: { setupLabels(); } | ||
Context not available. | |||||
610 | 616 | | |||
611 | 617 | | |||
612 | if (main.showDate) { | 618 | if (main.showDate) { | ||
613 | dateLabel.text = Qt.formatDate(main.currentTime, main.dateFormat); | 619 | dateLabel.text = Qt.formatDate( main.currentTime, main.dateFormat === 999 ? main.customDateFormat : main.dateFormat ); | ||
614 | } else { | 620 | } else { | ||
615 | // clear it so it doesn't take space in the layout | 621 | // clear it so it doesn't take space in the layout | ||
616 | dateLabel.text = ""; | 622 | dateLabel.text = ""; | ||
Context not available. |