From 59e5db5cae0cd238e21fbe483ed0dd442efae73f Mon Sep 17 00:00:00 2001 From: tr1x_em Date: Mon, 11 Aug 2025 19:11:05 +0530 Subject: [PATCH] Fix Wifi Style Updation tweaked control panel looks --- modules/controlcenter/main.py | 26 ++++++++++++++------------ modules/controlcenter/wifi.py | 12 ++++++------ styles/controlcenter.css | 9 +++++++++ 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/modules/controlcenter/main.py b/modules/controlcenter/main.py index a931f3a..7c8e155 100644 --- a/modules/controlcenter/main.py +++ b/modules/controlcenter/main.py @@ -274,16 +274,17 @@ class ModusControlCenter(Window): self.flight_widget = Button( name="flight-widget", child=Box( - orientation="vertical", + orientation="h", spacing=4, - h_align="center", + h_align="start", v_align="center", + h_expand=True, children=[ self.flight_icon, Label( label="Flight", style_classes="title", - h_align="center", + h_align="start", ), ], ), @@ -303,7 +304,7 @@ class ModusControlCenter(Window): self.caffeine_widget = Button( name="caffeine-widget", child=Box( - orientation="vertical", + orientation="h", spacing=4, h_align="center", v_align="center", @@ -366,18 +367,19 @@ class ModusControlCenter(Window): orientation="vertical", name="flight-widget-container", style_classes="menu", + h_expand=True, children=[ self.flight_widget, ], ), - Box( - orientation="vertical", - name="caffeine-widget-container", - style_classes="menu", - children=[ - self.caffeine_widget, - ], - ), + # Box( + # orientation="vertical", + # name="caffeine-widget-container", + # style_classes="menu", + # children=[ + # self.caffeine_widget, + # ], + # ), ], ), ], diff --git a/modules/controlcenter/wifi.py b/modules/controlcenter/wifi.py index 1c54899..6cb612d 100644 --- a/modules/controlcenter/wifi.py +++ b/modules/controlcenter/wifi.py @@ -51,10 +51,10 @@ class WifiNetworkSlot(Box): children=[self.dimage], style_classes=["wifi-icon-box"], ) - if self.is_connected: - self.wifi_icon_box.remove_style_class("wifi-icon-box") - self.wifi_icon_box.add_style_class("wifi-icon-box-connected") - + # if self.is_connected: + # self.wifi_icon_box.remove_style_class("wifi-icon-box") + # self.wifi_icon_box.add_style_class("wifi-icon-box-connected") + # # Set initial style classes if self.is_connected: self.dimage.add_style_class("connected") @@ -172,9 +172,9 @@ class WifiNetworkSlot(Box): ] # Update style classes for SVG widget if self.is_connected: - self.dimage.add_style_class("connected") + self.wifi_icon_box.add_style_class("wifi-icon-box-connected") else: - self.dimage.remove_style_class("connected") + self.wifi_icon_box.remove_style_class("wifi-icon-box-connected") return def _show_password_dialog(self): diff --git a/styles/controlcenter.css b/styles/controlcenter.css index 3a1e302..5252972 100644 --- a/styles/controlcenter.css +++ b/styles/controlcenter.css @@ -1,3 +1,8 @@ +.title { + font-size: 16px; + font-family: "SF Pro Rounded"; + font-weight: bold; +} #control-center-menu { background-color: transparent; border-radius: 12px; @@ -929,3 +934,7 @@ padding: 2px; /* margin-right: 8px; */ } + +#flight-icon { + margin-left: -10px; +}