diff --git a/ClearClock.tar.gz b/ClearClock.tar.gz
index f068236..ed5ab56 100644
Binary files a/ClearClock.tar.gz and b/ClearClock.tar.gz differ
diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml
index 124a6a2..d9dfbd7 100644
--- a/package/contents/config/main.xml
+++ b/package/contents/config/main.xml
@@ -9,9 +9,13 @@
-
+
true
+
+
+ false
+
.
diff --git a/package/contents/ui/config/configAppearance.qml b/package/contents/ui/config/configAppearance.qml
index 8d8ea6f..d8a87f0 100644
--- a/package/contents/ui/config/configAppearance.qml
+++ b/package/contents/ui/config/configAppearance.qml
@@ -20,6 +20,7 @@ Item {
signal configurationChanged
property alias cfg_clockUse24hFormat: use24hFormat.checkState
+ property alias cfg_clockShowSeconds: showSeconds.checkState
property alias cfg_clockSeparator: clockSeparatorTextField.text
property string cfg_clockFontColor
property string cfg_clockFontFamily
@@ -128,6 +129,13 @@ Item {
checked: cfg_clockUse24hFormat
}
+ QtControls.CheckBox {
+ id: showSeconds
+ text: i18n("Show seconds")
+ tristate: false
+ checked: cfg_clockShowSeconds
+ }
+
QtLayouts.RowLayout {
QtControls.Label {
text: i18n("Separator:")
diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml
index c8de0ef..ed128a8 100644
--- a/package/contents/ui/main.qml
+++ b/package/contents/ui/main.qml
@@ -24,8 +24,8 @@ Item {
id: dataSource
engine: "time"
connectedSources: ["Local"]
- interval: 60000
- intervalAlignment: PlasmaCore.Types.AlignToMinute
+ interval: plasmoid.configuration.clockShowSeconds ? 1000 : 60000
+ intervalAlignment: plasmoid.configuration.clockShowSeconds ? PlasmaCore.Types.NoAlignment : PlasmaCore.Types.AlignToMinute
}
FontLoader {
@@ -52,7 +52,8 @@ Item {
font.family: clockLabel.font.family
font.pixelSize: clockLabel.font.pixelSize
font.bold: clockLabel.font.bold
- text: " 99:99 "
+ text: if (!plasmoid.configuration.clockShowSeconds) " 99:99 "
+ else " 99:99:99 "
}
TextMetrics {
@@ -72,8 +73,15 @@ Item {
id: clockLabel
anchors.centerIn: parent
- text: if (plasmoid.configuration.clockUse24hFormat) Qt.formatTime(currentDateTime, "hh.mm").replace(".", plasmoid.configuration.clockSeparator)
- else Qt.formatTime(currentDateTime, "hh.mm AP").replace(".", plasmoid.configuration.clockSeparator)
+ property var textFormat: {
+ var AMPM = plasmoid.configuration.clockUse24hFormat ? "" : " AP"
+ if (plasmoid.configuration.clockShowSeconds)
+ return Qt.formatTime(currentDateTime, "hh.mm.ss" + AMPM).replace(".", plasmoid.configuration.clockSeparator)
+ else
+ return Qt.formatTime(currentDateTime, "hh.mm" + AMPM).replace(".", plasmoid.configuration.clockSeparator)
+ }
+
+ text: textFormat
color: plasmoid.configuration.clockFontColor
font.family: if (plasmoid.configuration.clockFontFamily === "ccdefault") fontOutfitBold.name