From 6171577ecc62bd770c952089e6a4dc78b42f2a1c Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 3 Jul 2026 20:53:18 +0545 Subject: [PATCH] refactor(controlcenter): remove animation effects and adjust visibility logic --- src/window/controlcenter/bluetooth.py | 17 +++++++++-------- src/window/controlcenter/wifi.py | 9 ++++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/window/controlcenter/bluetooth.py b/src/window/controlcenter/bluetooth.py index e072638..ef8db3f 100644 --- a/src/window/controlcenter/bluetooth.py +++ b/src/window/controlcenter/bluetooth.py @@ -259,16 +259,13 @@ class BluetoothDeviceSlot(CenterBox): if state == BTState.CONNECTED: self.add_style_class("active") - self.status_icon.set_visible(True) - self.status_icon.set_from_icon_name("emblem-ok-symbolic", 5) + self.status_icon.set_visible(False) elif state == BTState.CONNECTING: self.add_style_class("connecting") - self.status_icon.set_visible(True) - self.status_icon.set_from_icon_name("process-working-symbolic", 5) + self.status_icon.set_visible(False) elif state == BTState.FAILED: self.add_style_class("failed") - self.status_icon.set_visible(True) - self.status_icon.set_from_icon_name("dialog-error-symbolic", 5) + self.status_icon.set_visible(False) GLib.timeout_add(5000, self._reset_from_failed) else: self.status_icon.set_visible(False) @@ -367,6 +364,7 @@ class BluetoothConnections(Box): max_content_size=(303, 200), child=self.paired_devices, overlay_scroll=True, + animate=False, ) self.no_devices_label = Label( @@ -377,7 +375,10 @@ class BluetoothConnections(Box): ) self.other_devices_button = Button( - child=Label("Other Devices", h_align="start"), + child=CenterBox( + start_children=Label("Other Devices", h_align="start"), + end_children=self.refresh_indicator, + ), name="wifi-other-button", on_clicked=self.toggle_other_devices, ) @@ -388,6 +389,7 @@ class BluetoothConnections(Box): max_content_size=(303, 300), child=self.other_devices, overlay_scroll=True, + animate=False, ) self.other_devices.set_visible(False) @@ -406,7 +408,6 @@ class BluetoothConnections(Box): end_children=self.toggle_button, name="bluetooth-widget-top", ), - self.refresh_indicator, Separator(orientation="h", name="separator"), self.paired_devices_label, self.paired_devices_scrolled, diff --git a/src/window/controlcenter/wifi.py b/src/window/controlcenter/wifi.py index 8398382..5087b31 100644 --- a/src/window/controlcenter/wifi.py +++ b/src/window/controlcenter/wifi.py @@ -325,6 +325,7 @@ class WifiConnections(Box): max_content_size=(303, 200), child=self.known_networks, overlay_scroll=True, + animate=False, ) # Create "No networks available" message @@ -335,9 +336,11 @@ class WifiConnections(Box): visible=False, ) - # Create Other Networks section with clickable title self.other_networks_button = Button( - child=Label("Other Networks", h_align="start"), + child=CenterBox( + start_children=Label("Other Networks", h_align="start"), + end_children=self.refresh_indicator, + ), name="wifi-other-button", on_clicked=self.toggle_other_networks, ) @@ -349,6 +352,7 @@ class WifiConnections(Box): max_content_size=(303, 300), child=self.other_networks, overlay_scroll=True, + animate=False, ) self.other_networks.set_visible(False) @@ -368,7 +372,6 @@ class WifiConnections(Box): end_children=self.toggle_button, name="wifi-widget-top", ), - self.refresh_indicator, Separator(orientation="h", name="separator"), self.known_networks_label, self.known_networks_scrolled,