From e5293fec4cf7bae83335ad9d2c66137387b5dce3 Mon Sep 17 00:00:00 2001 From: Alfredo Monclus Date: Tue, 17 Feb 2026 07:42:49 -0300 Subject: [PATCH] fix: wifi toggle could get stretched on some layouts --- panels/network.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panels/network.py b/panels/network.py index 34783671..35a19dff 100644 --- a/panels/network.py +++ b/panels/network.py @@ -76,18 +76,20 @@ class Panel(ScreenPanel): self.reload_button.connect("clicked", self.reload_networks) self.reload_button.set_hexpand(False) - self.wifi_toggle = Gtk.Switch( + self.wifi_toggle_switch = Gtk.Switch( width_request=round(self._gtk.font_size * 2), height_request=round(self._gtk.font_size), active=self.sdbus_nm.is_wifi_enabled() ) - self.wifi_toggle.connect("notify::active", self.toggle_wifi) + self.wifi_toggle_switch.connect("notify::active", self.toggle_wifi) + wifi_toggle = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + wifi_toggle.add(self.wifi_toggle_switch) sbox = Gtk.Box(hexpand=True, vexpand=False) sbox.add(self.labels['interface']) sbox.add(self.labels['ip']) sbox.add(self.reload_button) - sbox.add(self.wifi_toggle) + sbox.add(wifi_toggle) scroll = self._gtk.ScrolledWindow() self.labels['main_box'] = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, vexpand=True)