fix(astal-menu): single module border; unblock rfkill so Bluetooth powers on
- Borders: with the app stylesheet now above the theme, the CSS `.quad-card` border rendered a second ring concentric with the Cairo bordered() ring. Drop the CSS border/background/radius from the card boxes so only the Cairo card shows. - Bluetooth: the power/scan/connect controls were correctly wired to AstalBluetooth, but the adapter was rfkill soft-blocked, making set_powered a silent no-op. The power toggle now runs `rfkill unblock bluetooth` before powering on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XUWCXM4KhjRkwheaA3X7bPfeat/astal-menu
parent
503b7f3336
commit
4e5ee4f9ba
|
|
@ -15,6 +15,7 @@ import gi
|
|||
gi.require_version("Gtk", "4.0")
|
||||
from gi.repository import Gtk # noqa: E402
|
||||
|
||||
from lib.proc import run_text
|
||||
from module_base import Feature, ModuleContext, ModuleInstance, ModuleSpec
|
||||
from paths import CACHE_DIR
|
||||
|
||||
|
|
@ -83,8 +84,15 @@ class _BluetoothView(Gtk.Box):
|
|||
|
||||
def _on_power(self, _sw, value: bool) -> bool:
|
||||
ad = self._adapter()
|
||||
if ad:
|
||||
ad.set_powered(value)
|
||||
if value:
|
||||
# The adapter is frequently rfkill soft-blocked at boot; while blocked,
|
||||
# AstalBluetooth.set_powered(True) is a silent no-op. Unblock first, then
|
||||
# power on (bluez usually auto-powers on unblock, so set_powered is a
|
||||
# belt-and-suspenders follow-up).
|
||||
run_text(["rfkill", "unblock", "bluetooth"],
|
||||
lambda *_a: ad.set_powered(True) if ad else None)
|
||||
elif ad:
|
||||
ad.set_powered(False)
|
||||
return False
|
||||
|
||||
def _on_scan(self, btn: Gtk.ToggleButton) -> None:
|
||||
|
|
|
|||
|
|
@ -45,16 +45,16 @@ drawingarea {
|
|||
.quad-card { min-height: 190px; }
|
||||
.section-title { color: @text; font-weight: bold; opacity: 0.85; }
|
||||
|
||||
/* The single module border + background is drawn with Cairo by bordered(fill_bg=True)
|
||||
* (see lib/border.py); the CSS border/background here would render a second,
|
||||
* concentric ring now that the app stylesheet sits above the theme, so only keep
|
||||
* the inner content padding. */
|
||||
.quad-card,
|
||||
.quad-expanded,
|
||||
.appdrawer,
|
||||
.taskbar,
|
||||
.favorites {
|
||||
background: @bg;
|
||||
border: 3px solid @accent;
|
||||
border-radius: 18px;
|
||||
padding: 12px 14px;
|
||||
margin: 3px; /* keep the border off the grid/overlay clip edge */
|
||||
}
|
||||
|
||||
.quad-header,
|
||||
|
|
|
|||
Loading…
Reference in New Issue