Replace bg(Color::DarkGray) with Modifier::REVERSED in highlight_style so the selected-row highlight adapts to both light and dark terminal themes. Co-authored-by: jpoehnelt-bot <jpoehnelt-bot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@googleworkspace/cli": patch
|
||||
---
|
||||
|
||||
Fix highlight color on light terminal themes by using reverse video instead of a dark-gray background
|
||||
+2
-10
@@ -405,11 +405,7 @@ fn run_picker_loop(
|
||||
.collect();
|
||||
|
||||
let list = List::new(items)
|
||||
.highlight_style(
|
||||
Style::default()
|
||||
.bg(Color::DarkGray)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
)
|
||||
.highlight_style(Style::default().add_modifier(Modifier::REVERSED | Modifier::BOLD))
|
||||
.highlight_symbol("▸ ");
|
||||
|
||||
frame.render_stateful_widget(list, chunks[1], &mut state.list_state);
|
||||
@@ -806,11 +802,7 @@ impl SetupWizard {
|
||||
.borders(Borders::ALL)
|
||||
.border_style(Style::default().fg(Color::DarkGray)),
|
||||
)
|
||||
.highlight_style(
|
||||
Style::default()
|
||||
.bg(Color::DarkGray)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
)
|
||||
.highlight_style(Style::default().add_modifier(Modifier::REVERSED | Modifier::BOLD))
|
||||
.highlight_symbol("▸ ");
|
||||
|
||||
frame.render_stateful_widget(list, area, &mut picker.list_state);
|
||||
|
||||
Reference in New Issue
Block a user