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 <noreply@anthropic.com>
This commit is contained in:
shuki
2026-03-05 23:47:41 +02:00
parent 587149f062
commit 9fb8aeb1ed
2 changed files with 9 additions and 3 deletions

View File

@@ -192,6 +192,12 @@ Select {
} }
/* Switch row */ /* Switch row */
Switch { #te-switch-row {
margin: 0 0 1 1; height: auto;
align: left middle;
margin: 0 0 1 0;
}
Switch {
margin: 0 1;
} }

View File

@@ -46,7 +46,7 @@ class TargetEditScreen(Screen):
yield Input(value=target.pre_hook, placeholder="Command to run before backup", id="te-prehook") yield Input(value=target.pre_hook, placeholder="Command to run before backup", id="te-prehook")
yield Static("Post-backup hook:") yield Static("Post-backup hook:")
yield Input(value=target.post_hook, placeholder="Command to run after backup", id="te-posthook") 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 Static("Enabled: ")
yield Switch(value=target.enabled == "yes", id="te-enabled") yield Switch(value=target.enabled == "yes", id="te-enabled")
with Horizontal(id="te-buttons"): with Horizontal(id="te-buttons"):