diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index ede7bff6..9941f309 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -219,8 +219,8 @@ NPanel { anchors.right: parent.right anchors.rightMargin: Style.marginM anchors.verticalCenter: parent.verticalCenter + progressColor: Color.mOnPrimary Layout.alignment: Qt.AlignVCenter - now: root.now } } diff --git a/Modules/Bar/Calendar/ClockLoader.qml b/Modules/Bar/Calendar/ClockLoader.qml index 02d6d1dc..ae027702 100644 --- a/Modules/Bar/Calendar/ClockLoader.qml +++ b/Modules/Bar/Calendar/ClockLoader.qml @@ -49,6 +49,7 @@ Item { return bestColor } + property color progressColor: clockRoot.secondHandColor height: Math.round((Style.fontSizeXXXL * 1.9) / 2 * Style.uiScaleRatio) * 2 @@ -64,7 +65,12 @@ Item { item.now = Qt.binding(function() { return clockRoot.now }) item.backgroundColor = Qt.binding(function() { return clockRoot.backgroundColor }) item.clockColor = Qt.binding(function() { return clockRoot.clockColor }) - item.secondHandColor = Qt.binding(function() { return clockRoot.secondHandColor }) + if (item.hasOwnProperty("secondHandColor")) { + item.secondHandColor = Qt.binding(function() { return clockRoot.secondHandColor }) + } + if (item.hasOwnProperty("progressColor")) { + item.progressColor = Qt.binding(function() { return clockRoot.progressColor }) + } if (item.hasOwnProperty("markAlpha")) { item.markAlpha = Qt.binding(function() { return clockRoot.markAlpha }) } diff --git a/Modules/Bar/Calendar/DigitalClock.qml b/Modules/Bar/Calendar/DigitalClock.qml index 3a129e36..f5ff2ccb 100644 --- a/Modules/Bar/Calendar/DigitalClock.qml +++ b/Modules/Bar/Calendar/DigitalClock.qml @@ -9,7 +9,7 @@ Item { property var now property color backgroundColor: Color.mPrimary property color clockColor: Color.mOnPrimary - property color secondHandColor: Color.mError + property color progressColor: Color.mError anchors.fill: parent // Digital clock's seconds circular progress @@ -43,7 +43,7 @@ Item { ctx.beginPath() ctx.arc(centerX, centerY, radius, -Math.PI / 2, -Math.PI / 2 + progress * 2 * Math.PI) ctx.lineWidth = 2.5 - ctx.strokeStyle = secondHandColor + ctx.strokeStyle = progressColor ctx.lineCap = "round" ctx.stroke() }