Changeset View
Changeset View
Standalone View
Standalone View
applets/digital-clock/package/contents/ui/DigitalClock.qml
Show First 20 Lines • Show All 588 Lines • ▼ Show 20 Line(s) | 586 | if (showTimezone) { | |||
---|---|---|---|---|---|
589 | timezoneLabel.text = (main.showDate || main.oneLineMode) && plasmoid.formFactor == PlasmaCore.Types.Horizontal ? "(" + timezoneString + ")" : timezoneString; | 589 | timezoneLabel.text = (main.showDate || main.oneLineMode) && plasmoid.formFactor == PlasmaCore.Types.Horizontal ? "(" + timezoneString + ")" : timezoneString; | ||
590 | } else { | 590 | } else { | ||
591 | // this clears the label and that makes it hidden | 591 | // this clears the label and that makes it hidden | ||
592 | timezoneLabel.text = timezoneString; | 592 | timezoneLabel.text = timezoneString; | ||
593 | } | 593 | } | ||
594 | 594 | | |||
595 | 595 | | |||
596 | if (main.showDate) { | 596 | if (main.showDate) { | ||
597 | if (main.dateFormat == Qt.SystemLocaleLongDate) { | ||||
598 | dateLabel.text = uiLocaleFormatDate(main.currentTime, Qt.locale().dateFormat(Locale.LongFormat)); | ||||
599 | } else { | ||||
597 | dateLabel.text = Qt.formatDate(main.currentTime, main.dateFormat); | 600 | dateLabel.text = Qt.formatDate(main.currentTime, main.dateFormat); | ||
601 | } | ||||
598 | } else { | 602 | } else { | ||
599 | // clear it so it doesn't take space in the layout | 603 | // clear it so it doesn't take space in the layout | ||
600 | dateLabel.text = ""; | 604 | dateLabel.text = ""; | ||
601 | } | 605 | } | ||
602 | 606 | | |||
603 | // find widest character between 0 and 9 | 607 | // find widest character between 0 and 9 | ||
604 | var maximumWidthNumber = 0; | 608 | var maximumWidthNumber = 0; | ||
605 | var maximumAdvanceWidth = 0; | 609 | var maximumAdvanceWidth = 0; | ||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |