Closed eminfedar closed 1 year ago
Hi, and thanks for the report!
The terminal "theme" defines a couple of colors that can be used by applications:
cursive::theme::Color::{Dark, Light}
.cursive::theme::Color::TerminalDefault
. If the color is used in background, it will use the terminal background color. If the color is used in foreground, it will use the terminal text color.So if you only want to use the text and background colors, you can use a theme where every color of the palette is set to TerminalDefault
.
Note that using TerminalDefault
for everything currently had one major drawback: it was messing up text highlighting.
Should be fixed with the latest commit. It also adds Theme::terminal_default()
as a convenience method to return a theme that only uses this color.
(Technical details: The reason is that highlighting so far was done by directly specifying the fore and back colors, but if we specify Terminal Default, it will actually look indistinguishable from regular text. The fix was to swap the colors for the highlight style, and rely on the "reverse" effect instead.)
Is your feature request related to a problem? Please describe. If I use native ncurses or tui-rs, it is themeless by default, which means whatever my default terminal color is, I see it.
If I use light colors on my terminal, I see light colors. If I see dark green theme on my terminal, I see dark green theme. I couldn't find a Palette or Theme default methods or traits for this.
Describe the solution you'd like I need something like
theme::no_theme()
ortheme::system_defaults()
. I don't want to define custom permanent colors. I want my tui program is obeying the terminal colors of the user. Likehtop
for example. Additionally has custom colors but they are above the system colors.Additional context
htop
screenshot examples which respects to system default theme