Skip to content

Commit

Permalink
fix: style for texteditor and menu in queryselect
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Feb 10, 2024
1 parent e077ac4 commit 24bc8d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/preset/queryselect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ impl QuerySelect {
.prefix(theme.prefix)
.prefix_style(theme.prefix_style)
.style(theme.text_style)
.cursor_style(theme.cursor_style);
.cursor_style(theme.text_editor_cursor_style);
self.menu_builder = self
.menu_builder
.cursor(theme.cursor)
.cursor(theme.menu_cursor)
.style(theme.item_style)
.cursor_style(theme.cursor_style);
.cursor_style(theme.menu_cursor_style);
self
}

Expand Down
10 changes: 6 additions & 4 deletions src/preset/theme/queryselect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ pub struct Theme {
pub item_style: ContentStyle,
pub prefix: String,
pub prefix_style: ContentStyle,
pub cursor: String,
pub cursor_style: ContentStyle,
pub menu_cursor: String,
pub menu_cursor_style: ContentStyle,
pub text_editor_cursor_style: ContentStyle,
}

impl Default for Theme {
Expand All @@ -23,8 +24,9 @@ impl Default for Theme {
item_style: Style::new().build(),
prefix: String::from("❯❯ "),
prefix_style: Style::new().fgc(Color::DarkGreen).build(),
cursor: String::from("❯ "),
cursor_style: Style::new().fgc(Color::DarkCyan).build(),
menu_cursor: String::from("❯ "),
menu_cursor_style: Style::new().fgc(Color::DarkCyan).build(),
text_editor_cursor_style: Style::new().bgc(Color::DarkCyan).build(),
}
}
}

0 comments on commit 24bc8d1

Please sign in to comment.