From 44987758a8d747c32b6f5d92ca52d47f9a758eb4 Mon Sep 17 00:00:00 2001 From: tr1x_em Date: Mon, 11 Aug 2025 12:03:32 +0530 Subject: [PATCH] Fixed Styling --- modules/controlcenter/battery.py | 2 +- modules/controlcenter/main.py | 48 ++++++++++++------------ modules/controlcenter/wifi.py | 2 - modules/panel/components/indicators.py | 1 - styles/battery-widget.css | 5 ++- styles/controlcenter.css | 52 +++++++++++++++++--------- 6 files changed, 64 insertions(+), 46 deletions(-) diff --git a/modules/controlcenter/battery.py b/modules/controlcenter/battery.py index 1114e87..068de6e 100644 --- a/modules/controlcenter/battery.py +++ b/modules/controlcenter/battery.py @@ -164,7 +164,7 @@ class BatteryControl(Box): name="control-center-widgets", **kwargs, ) - self.set_size_request(374, -1) + self.set_size_request(354, -1) self.parent = parent self.battery_service = Battery() diff --git a/modules/controlcenter/main.py b/modules/controlcenter/main.py index 906da29..86f411b 100644 --- a/modules/controlcenter/main.py +++ b/modules/controlcenter/main.py @@ -442,30 +442,30 @@ class ModusControlCenter(Window): self.bluetooth_widgets = Box( orientation="vertical", h_expand=True, - name="control-center-widgets", + v_expand=True, children=[ - Box( - orientation="horizontal", - name="top-widget", - h_expand=True, - children=[ - Box( - orientation="vertical", - name="wb-widget", - style_classes="menu", - spacing=5, - children=[ - self.bluetooth_man, - ], - ), - ], - ), + self.bluetooth_man, + # Box( + # orientation="horizontal", + # name="top-widget", + # h_expand=True, + # children=[ + # Box( + # orientation="vertical", + # name="wb-widget", + # style_classes="menu", + # spacing=5, + # children=[ + # ], + # ), + # ], + # ), ], ) - self.bluetooth_center_box = CenterBox( - start_children=[self.bluetooth_widgets] + self.bluetooth_center_box = Box( + h_expand=True, v_expand=True, children=[self.bluetooth_widgets] ) - self.bluetooth_center_box.set_size_request(300, -1) + self.bluetooth_center_box.set_size_request(350, -1) def _ensure_wifi_widgets(self): """Lazy load wifi widgets""" @@ -473,13 +473,15 @@ class ModusControlCenter(Window): self.wifi_widgets = Box( orientation="vertical", h_expand=True, - name="control-center-widgets", + v_expand=True, children=[ self.wifi_man, ], ) - self.wifi_center_box = CenterBox(start_children=[self.wifi_widgets]) - self.wifi_center_box.set_size_request(300, -1) + self.wifi_center_box = Box( + h_expand=True, v_expand=True, children=[self.wifi_widgets] + ) + self.wifi_center_box.set_size_request(350, -1) def _ensure_per_app_volume_widgets(self): """Lazy load per-app volume widgets""" diff --git a/modules/controlcenter/wifi.py b/modules/controlcenter/wifi.py index 28b0da4..bd5ccd6 100644 --- a/modules/controlcenter/wifi.py +++ b/modules/controlcenter/wifi.py @@ -241,7 +241,6 @@ class WifiConnections(Box): super().__init__( spacing=8, orientation="vertical", - style="margin: 8px", name="wifi-connections", **kwargs, ) @@ -326,7 +325,6 @@ class WifiConnections(Box): child_revealed=False, ) - self.other_networks_revealer.child_revealed = False # Create More Settings button (same style as Other Networks button) self.more_settings_button = Button( child=Label("More Settings", h_align="start"), diff --git a/modules/panel/components/indicators.py b/modules/panel/components/indicators.py index b249e68..78df61f 100644 --- a/modules/panel/components/indicators.py +++ b/modules/panel/components/indicators.py @@ -187,7 +187,6 @@ class NetworkIndicator(Box): layer="overlay", title="modus", anchor="top right", - margin="2px 10px 0px 0px", exclusivity="auto", keyboard_mode="on-demand", name="wifi-control-window", diff --git a/styles/battery-widget.css b/styles/battery-widget.css index 772bd7d..871a6f8 100644 --- a/styles/battery-widget.css +++ b/styles/battery-widget.css @@ -1,6 +1,7 @@ #battery-widget { - padding-left: 12px; - padding-right: 12px; + background: rgba(0, 0, 0, 0); + padding-left: 5px; + padding-right: 5px; } .battery-main-title { font-size: 16px; diff --git a/styles/controlcenter.css b/styles/controlcenter.css index ad1f6e8..8ad4af5 100644 --- a/styles/controlcenter.css +++ b/styles/controlcenter.css @@ -1,32 +1,38 @@ #control-center-menu { background-color: transparent; - border-radius: 15px; + border-radius: 12px; box-shadow: none; margin: 0; } #separator { - min-height: 2px; - margin: 2px 0; - background-color: var(--outline); + min-height: 0.09rem; + margin: 3px 0; + background-color: alpha(#fff, 0.2); border-radius: 8px; } -#bluetooth-control-window, -#wifi-control-window, +/* #bluetooth-control-window { */ +/* #wifi-control-window, */ #battery-control-window { margin: 6px; - background-color: alpha(#fff, 0.09); + /* background-color: alpha(#fff, 0.09); */ border: 1px solid alpha(#111, 0.3); box-shadow: inset 0 0 200px 0 alpha(#111, 0.3); border-radius: 15px; } +#bluetooth-title, +#wifi-title { + font-family: "SF Pro Rounded"; + font-size: 16px; + font-weight: bold; +} #control-center-widgets { - background-color: alpha(#fff, 0.09); + background-color: alpha(#fff, 0.05); box-shadow: inset 0 0 0 1px alpha(#aaa, 0.4); border: 1px solid alpha(#111, 0.4); - border-radius: 1.25rem; + border-radius: 8px; padding: 0.5rem; } @@ -835,9 +841,14 @@ /* macOS-style WiFi interface */ #wifi-connections, #bluetooth-connections { - background-color: rgba(255, 255, 255, 0.08); - border-radius: 12px; - padding: 12px; + /* background-color: rgba(255, 255, 255, 0.08); */ + background-color: alpha(#fff, 0.05); + box-shadow: inset 0 0 0 1px alpha(#aaa, 0.4); + border: 1px solid alpha(#111, 0.4); + border-radius: 8px; + /* padding: 0.5rem; */ + /* border-radius: 12px; */ + padding: 10px; } /* WiFi network slots - macOS style */ @@ -877,7 +888,9 @@ #wifi-other-button { background: transparent; border: none; - padding: 8px 12px; + padding: 8px 6px; + margin-bottom: -12px; + margin-top: -6px; border-radius: 8px; /* transition: background-color 0.2s ease; */ } @@ -885,10 +898,8 @@ #wifi-other-button:hover { background-color: rgba(255, 255, 255, 0.1); } - -#wifi-other-button label { - font-size: 14px; - font-weight: 500; +#wifi-other-button:last-child { + margin-bottom: 3px; } #device-button { @@ -902,3 +913,10 @@ .button-hovered { background-color: rgba(255, 255, 255, 0.1); } + +#wifi-other-device label, +#wifi-other-button label { + font-size: 12px; + font-weight: bold; + font-family: "SF Pro Rounded"; +}