From a0a4724ec25f648df2097ba78929afe8962ff841 Mon Sep 17 00:00:00 2001 From: Jai Infante Date: Fri, 25 Sep 2026 01:20:50 +0800 Subject: [PATCH] fix(bar): stop idle animations that redraw the bar at 60 fps Three infinite animations kept running while their popups were closed, so the bar's layer surface committed a frame every vsync on an idle desktop: - Clock: the WeatherIcon in the expanded popup animated while collapsed. Gate it on root.expanded. - Clock: the colon faded continuously. Toggle it from the existing 1 s clock timer instead, so it still blinks at one frame per second. - WifiPanel/BluetoothPanel: the "connected" dot pulsed with the panel closed. Gate it on the panel's active property. Fixes #42 Co-Authored-By: Claude Opus 5.5 --- lucidbar/BluetoothPanel.qml | 2 +- lucidbar/Clock.qml | 4 +++- lucidbar/WifiPanel.qml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lucidbar/BluetoothPanel.qml b/lucidbar/BluetoothPanel.qml index 8b917c3..bc4aa66 100644 --- a/lucidbar/BluetoothPanel.qml +++ b/lucidbar/BluetoothPanel.qml @@ -732,7 +732,7 @@ Item { anchors.margins: -2 SequentialAnimation on opacity { - running: devItem.isConnected + running: devItem.isConnected && root.active loops: Animation.Infinite NumberAnimation { diff --git a/lucidbar/Clock.qml b/lucidbar/Clock.qml index 9087cf8..1bbd9f7 100644 --- a/lucidbar/Clock.qml +++ b/lucidbar/Clock.qml @@ -389,6 +389,7 @@ BarPill { expandedTimeText.text = Loc.now().toLocaleTimeString(Qt.locale(), root.fullTimeFormat); expandedDateText.text = Loc.now().toLocaleDateString(Qt.locale(), "dddd, MMMM d"); root.clockTick++; + clockColonText.opacity = clockColonText.opacity < 1 ? 1 : 0.45; root.checkReminders(); } } @@ -425,7 +426,7 @@ BarPill { SequentialAnimation on opacity { loops: Animation.Infinite - running: true + running: false NumberAnimation { from: 1 @@ -894,6 +895,7 @@ BarPill { WeatherIcon { anchors.centerIn: parent + animate: root.expanded kind: WeatherSource.kindFor(root.weatherCode, root.isNight) // meteocons keeps more padding in its canvas than the old glyph did size: 26 diff --git a/lucidbar/WifiPanel.qml b/lucidbar/WifiPanel.qml index f8b9c8c..2c3f48e 100644 --- a/lucidbar/WifiPanel.qml +++ b/lucidbar/WifiPanel.qml @@ -159,7 +159,7 @@ Item { anchors.margins: -1 SequentialAnimation on opacity { - running: netItem.isConnected + running: netItem.isConnected && root.active loops: Animation.Infinite NumberAnimation {