style: unify New Session dialog focus highlight to accent
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1895,3 +1895,21 @@ async def test_sandbox_options_hidden_until_switch_on():
|
||||
switch.value = False
|
||||
await pilot.pause()
|
||||
assert options.display is False
|
||||
|
||||
|
||||
def test_dialog_focus_highlight_uses_accent():
|
||||
"""Every focusable control in the New Session dialog shares the Peach accent
|
||||
focus border (consistent with the dialog buttons), not Textual's default
|
||||
Lavender. Guards against the scoped :focus rule being dropped."""
|
||||
from pathlib import Path
|
||||
import hqt.tui
|
||||
|
||||
css = (Path(hqt.tui.__file__).parent / "styles.tcss").read_text()
|
||||
for selector in (
|
||||
"#new-session-dialog Switch:focus",
|
||||
"#new-session-dialog Checkbox:focus",
|
||||
"#new-session-dialog Select:focus",
|
||||
"#new-session-dialog Input:focus",
|
||||
):
|
||||
assert selector in css, f"missing focus rule: {selector}"
|
||||
assert "border: tall $accent;" in css
|
||||
|
||||
Reference in New Issue
Block a user