From 9fb8aeb1ed3587eb666f3c2369ec8897264e3b95 Mon Sep 17 00:00:00 2001 From: shuki Date: Thu, 5 Mar 2026 23:47:41 +0200 Subject: [PATCH] Fix Enabled switch not visible in target edit screen Give the switch Horizontal container an explicit ID and CSS with height:auto and proper alignment. Co-Authored-By: Claude Opus 4.6 --- tui/gniza.tcss | 10 ++++++++-- tui/screens/target_edit.py | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tui/gniza.tcss b/tui/gniza.tcss index 92a7409..c0ae5be 100644 --- a/tui/gniza.tcss +++ b/tui/gniza.tcss @@ -192,6 +192,12 @@ Select { } /* Switch row */ -Switch { - margin: 0 0 1 1; +#te-switch-row { + height: auto; + align: left middle; + margin: 0 0 1 0; +} + +Switch { + margin: 0 1; } diff --git a/tui/screens/target_edit.py b/tui/screens/target_edit.py index 6e503f9..3b35e18 100644 --- a/tui/screens/target_edit.py +++ b/tui/screens/target_edit.py @@ -46,7 +46,7 @@ class TargetEditScreen(Screen): yield Input(value=target.pre_hook, placeholder="Command to run before backup", id="te-prehook") yield Static("Post-backup hook:") yield Input(value=target.post_hook, placeholder="Command to run after backup", id="te-posthook") - with Horizontal(): + with Horizontal(id="te-switch-row"): yield Static("Enabled: ") yield Switch(value=target.enabled == "yes", id="te-enabled") with Horizontal(id="te-buttons"):