diff --git a/CHANGELOG.md b/CHANGELOG.md index fb6de51383..7b72348504 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ but this also allows us now to define colors in the common hex format: `selection_fg: Some(Rgb(0,255,0))` -> `selection_fg: Some("#00ff00")` -Checkout [THEME.md](./THEME.md) for more info. +Checkout [THEMES.md](./THEMES.md) for more info. ### Fixes * update yanked dependency to `libc` to fix building with `--locked`. diff --git a/THEMES.md b/THEMES.md index 25990f332f..166fd824aa 100644 --- a/THEMES.md +++ b/THEMES.md @@ -14,7 +14,27 @@ The file uses the [Ron format](https://github.com/ron-rs/ron) and is located at Alternatively, you can create a theme in the same directory mentioned above and use it with the `-t` flag followed by the name of the file in the directory. E.g. If you are on linux calling `gitui -t arc.ron`, this will load the theme in `$XDG_CONFIG_HOME/gitui/arc.ron` or `$HOME/.config/gitui/arc.ron`. -Example theme override: +Example theme override, valid for versions < 0.23: + +``` +( + selection_bg: Blue, + selection_fg: White, +) +``` + +Starting with 0.23, this needs to be changed to: + +``` +( + selection_bg: Some(Blue), + selection_fg: Some(White), +) +``` + +Note that you need to wrap values in `Some` due to the way the overrides work. + +Starting with 0.26.2, this needs to be changed to: ``` ( @@ -23,7 +43,9 @@ Example theme override: ) ``` -Note that you need to wrap values in `Some` due to the way the overrides work (as of 0.23). +Note that you need to specify colors using strings as opposed to bare enum variants due to a change in `ratatui`. + +See for context. Notes: