Skip to content

Add configurable list selection styling#96

Open
daewon wants to merge 5 commits intolusingander:masterfrom
daewon:ui-theme-customization
Open

Add configurable list selection styling#96
daewon wants to merge 5 commits intolusingander:masterfrom
daewon:ui-theme-customization

Conversation

@daewon
Copy link

@daewon daewon commented Mar 6, 2026

Closes #95.

Summary

  • add [ui.theme] settings for selected row colors
  • add optional object_dir_bold
  • preserve the existing default styling when the config is unset

Validation

  • cargo fmt --all -- --check
  • cargo test -q
  • cargo clippy --all-targets --all-features -- -D warnings

preview

daewon added 4 commits March 6, 2026 17:51
- centralize list selection style resolution in ColorTheme
- reuse UiThemeConfig for directory item styling
- align list rendering tests with active/inactive selection behavior

Validated with cargo fmt --all -- --check, cargo test -q, and cargo clippy --all-targets --all-features -- -D warnings on stable.
@lusingander
Copy link
Owner

lusingander commented Mar 7, 2026

Thank you for your pull request.
However, it seems we need to discuss the implementation policy.

If you're interested in making the changes, I'd be happy if you could consider it.
Even if you're not interested, I'd like to implement this feature sometime soon if I get around to it.

@daewon
Copy link
Author

daewon commented Mar 7, 2026

@lusingander Thank you for the feedback.

I really enjoy using STU, and I think it is a wonderful applicatiton with a great TUI design.

I’ll try implementing it in the direction you suggested and update the PR.

@daewon
Copy link
Author

daewon commented Mar 7, 2026

@lusingander I updated the implementation in the direction you suggested.

  • Renamed ColorTheme to Theme
  • Deserialized [ui.theme] directly into Theme
  • Switched to Ratatui's Color serde support and removed the manual color parsing layer
  • Made the existing theme fields configurable
  • Moved object_dir_bold into Theme
  • Updated the docs and tests accordingly

I also simplified the structure a bit so the theme is now read directly from the config as the single source of truth.

If there are still points that should be revised, please feel free to let me know.

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.

Support configurable list selection colors and directory bold styling

2 participants