Skip to content

Honor menu.selectedText and Color.accent across selection surfaces - #126

Open
salmun-nister wants to merge 1 commit into
typecraft-dev:mainfrom
salmun-nister:fix/selection-text-contrast
Open

salmun-nister wants to merge 1 commit into
typecraft-dev:mainfrom
salmun-nister:fix/selection-text-contrast

Conversation

@salmun-nister

@salmun-nister salmun-nister commented Dec 4, 2026 •

Copy link
Copy Markdown

Fixes #125

Summary

Themes with opaque light or bright [menu] selection fills and dark selected-text (e.g., Aqua Daydream, Moodpeak, Saga) rendered unreadable selected rows and invisible dark-on-dark accent elements (search caret, focused argument pills, unselected favorite/check icons) in omacast.

Changes

  • ui/LauncherWindow.qml:
    • Split look.accent (Commons.Color.accent) from look.selectedText (Commons.Color.menu.selectedText) so non-selected accent elements on the card background always use the theme's accent color.
    • Derive look.selectedSecondary and look.selectedInverted via core/Look.js.
  • core/Look.js & tests/look.test.js:
    • Add pure-JS WCAG contrast helper selectedSecondaryUsesForeground(background, foreground, selectedBackground) that composites selectedBackground over background and checks whether foreground keeps ≥ 4.5:1 contrast.
    • On translucent-wash themes (default Omarchy themes like Tokyo Night and Catppuccin Latte), secondary selected elements stay foreground, preserving neutral readability and the inline calculator's input-vs-answer hierarchy.
    • On opaque/inverted selection themes (like Aqua Daydream and Moodpeak), secondary selected elements automatically switch to selectedText.
  • ui/ResultRow.qml:
    • Primary selected elements (title, glyph, calculator answer, selected favorite/checked icons) use selectedText, matching Omarchy's native Menu.qml.
    • Secondary selected elements (subtitle, typeLabel, alias badge, calculator input/captions/arrow) use selectedSecondary.
    • When selection is inverted, slightly raise subtitle (0.70) and typeLabel (0.65) opacity for stronger contrast and soften calculator input (0.75) so the bold answer remains visually distinct.
  • ui/ActionPanel.qml & ui/Alert.qml:
    • Selected action rows (Action Panel, Filter Dropdown, Toast Actions) and non-destructive primary alert buttons use selectedText for icon/label and selectedSecondary for KeyHint.

Screenshots (Before | After)

Aqua Daydream (opaque light selection pill + dark selected-text)

Aqua Daydream — root
Aqua Daydream — action panel
Aqua Daydream — calculator

Tokyo Night (default dark theme — translucent selection wash)

Tokyo Night — root
Tokyo Night — action panel
Tokyo Night — calculator

Additional theme checks: Moodpeak (saturated opaque pill) & Catppuccin Latte (light theme)

Moodpeak

Moodpeak — root
Moodpeak — action panel
Moodpeak — calculator

Catppuccin Latte

Catppuccin Latte — root
Catppuccin Latte — action panel
Catppuccin Latte — calculator

Testing

  • node --test tests/*.test.js: 192 pass, 0 fail, 2 skipped (including 3 new tests in tests/look.test.js)
  • omarchy plugin validate .: passed
  • tests/smoke.sh: all checks pass (omacast doctor reports no QML errors in the shell log, worst toggle latency 49 ms)
  • Visually verified across Aqua Daydream, Moodpeak, Tokyo Night, and Catppuccin Latte.

Confidence Score: 5/5RetriggerView in Greptile

The PR appears safe to merge; no actionable defects were found.

Summary

Separates accent colors from selected text colors and updates selection surfaces to use the right theme colors.

  • Selected launcher rows now use colors that fit each theme.
  • Selected action rows and primary alert buttons use the theme's selection colors.

Reviews (1) · Last reviewed commit: "Honor menu.selectedText and Color.accent..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selected row text and accent elements are unreadable on themes with opaque selection fills

1 participant