diff --git a/modules/controlcenter/battery.py b/modules/controlcenter/battery.py index 810a0d8..baba90b 100644 --- a/modules/controlcenter/battery.py +++ b/modules/controlcenter/battery.py @@ -14,7 +14,7 @@ from gi.repository import GLib from services.battery import Battery -class EnergyModeButton(CenterBox): +class EnergyModeButton(Box): def __init__( self, profile_name: str, @@ -57,12 +57,13 @@ class EnergyModeButton(CenterBox): self.button = Button( child=start_box, + h_expand=True, name="energy-mode-button-clickable", on_clicked=self.on_clicked, style_classes="battery-profile-button", ) - self.start_children = [self.button] + self.children = [self.button] self.update_state() def on_clicked(self, *args): @@ -85,9 +86,9 @@ class EnergyModeButton(CenterBox): self.mode_icon.remove_style_class("connected") -class GameModeButton(CenterBox): +class GameModeButton(Box): def __init__(self, parent, **kwargs): - super().__init__(name="game-mode-button", **kwargs) + super().__init__(name="game-mode-button", h_expand=True, **kwargs) self.parent = parent self.game_icon = Image( @@ -114,10 +115,11 @@ class GameModeButton(CenterBox): child=start_box, name="game-mode-button-clickable", on_clicked=self.on_clicked, + h_expand=True, style_classes="battery-gamemode-button", ) - self.start_children = [self.button] + self.children = [self.button] self.update_state() def on_clicked(self, *args): diff --git a/modules/controlcenter/bluetooth.py b/modules/controlcenter/bluetooth.py index d954706..f4de9f0 100644 --- a/modules/controlcenter/bluetooth.py +++ b/modules/controlcenter/bluetooth.py @@ -21,7 +21,7 @@ gi.require_version("Gdk", "3.0") class BluetoothDeviceSlot(CenterBox): def __init__(self, device: BluetoothDevice, **kwargs): - super().__init__(**kwargs) + super().__init__(h_expand=True, name="device-button", **kwargs) self.device = device self.device.connect("changed", self.on_changed) self.device.connect( @@ -42,10 +42,13 @@ class BluetoothDeviceSlot(CenterBox): self.start_children = [ Button( - image=self.dimage, on_clicked=lambda *_: self.toggle_connecting(), + child=Box( + orientation="h", + h_expand=True, + children=[self.dimage, Label(label=device.name)], + ), # type: ignore ), - Label(label=device.name), # type: ignore ] # Add battery info if available diff --git a/styles/controlcenter.css b/styles/controlcenter.css index e56dfc7..13c117f 100644 --- a/styles/controlcenter.css +++ b/styles/controlcenter.css @@ -879,7 +879,7 @@ border: none; padding: 8px 12px; border-radius: 8px; - transition: background-color 0.2s ease; + /* transition: background-color 0.2s ease; */ } #wifi-other-button:hover { @@ -890,3 +890,10 @@ font-size: 14px; font-weight: 500; } + +#device-button { + /* background-color: #000; */ +} +#device-button.button:hover { + background-color: rgba(255, 255, 255, 0.1); +}