Skip to content

Commit

Permalink
💄 Change the foreground color of file name
Browse files Browse the repository at this point in the history
  • Loading branch information
harehare committed Nov 19, 2024
1 parent ce07a34 commit 280ba9a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl<'a> App<'a> {
}
} else {
let message = Paragraph::new("Please enter search keywords")
.style(self.theme.foreround_style())
.style(self.theme.foreground_style())
.block(Block::default().padding(Padding::top(2)))
.centered();
f.render_widget(message, list_area);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/confirm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Confirm {
.areas(buttons_area);
let description = Paragraph::new(self.text.as_str())
.block(Block::new().padding(Padding::new(2, 2, 2, 2)))
.style(theme.foreround_style());
.style(theme.foreground_style());
let block = Block::bordered()
.title(self.title.as_str())
.style(theme.popup_style());
Expand Down
4 changes: 2 additions & 2 deletions src/ui/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Input {
InputState::Input(Ok(_)) => {
let input = Paragraph::new(self.input.value())
.block(Block::default().padding(Padding::new(1, 0, 1, 1)))
.style(theme.foreround_style());
.style(theme.foreground_style());
f.render_widget(input, area);
f.set_cursor_position((
area.x + (self.input.visual_cursor()) as u16 + 1,
Expand All @@ -62,7 +62,7 @@ impl Input {
.ok();
let input = Paragraph::new(self.input.value())
.block(Block::default().padding(Padding::new(0, 0, 1, 1)))
.style(theme.foreround_style());
.style(theme.foreground_style());
f.render_widget(input, area);
f.set_cursor_position((
area.x + (self.input.visual_cursor()) as u16 + 1,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/input_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl InputList {
area,
);
f.render_widget(
Paragraph::new(Span::styled(icon.search(), theme.foreround_style()))
Paragraph::new(Span::styled(icon.search(), theme.foreground_style()))
.block(Block::default().padding(Padding::new(1, 0, 1, 1))),
icon_rect,
);
Expand Down
6 changes: 3 additions & 3 deletions src/ui/search_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,15 @@ impl SearchResult {
}
Row::Separator => Some(ListItem::new(Line::from(vec![Span::styled(
self.config.context_separator.clone(),
theme.foreround_style(),
theme.foreground_style(),
)]))),
})
.collect::<Vec<_>>();

if list_items.is_empty() {
f.render_widget(
Paragraph::new("Not Found")
.style(theme.foreround_style())
.style(theme.foreground_style())
.block(Block::default().padding(Padding::top(2)))
.centered(),
area,
Expand All @@ -358,7 +358,7 @@ impl SearchResult {
.block(
Block::bordered()
.title("Search Result")
.title_style(theme.foreround_style()),
.title_style(theme.foreground_style()),
);
f.render_stateful_widget(list, area, &mut self.state);
}
Expand Down
6 changes: 3 additions & 3 deletions src/ui/select_contidion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl SelectCondition {

let input = Paragraph::new(self.input.value())
.block(Block::bordered().border_style(theme.border_style()))
.style(theme.foreround_style());
.style(theme.foreground_style());

self.filtered_conditions = self
.conditions
Expand Down Expand Up @@ -84,7 +84,7 @@ impl SelectCondition {
f.render_widget(
Paragraph::new("Not found")
.block(Block::default().padding(Padding::new(1, 1, 0, 0)))
.style(theme.foreround_style()),
.style(theme.foreground_style()),
list_area,
);
} else {
Expand All @@ -105,7 +105,7 @@ impl SelectCondition {
} else if condition.is_transform() {
theme.transform_style()
} else {
theme.foreround_style()
theme.foreground_style()
};

ListItem::new(Line::from(Span::styled(s, style)))
Expand Down
4 changes: 2 additions & 2 deletions src/ui/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Theme for Dark {

fn file_style(&self) -> Style {
Style::default()
.fg(Color::Yellow)
.fg(Color::Magenta)
.add_modifier(Modifier::BOLD)
}

Expand Down Expand Up @@ -123,7 +123,7 @@ impl Theme for Light {

fn file_style(&self) -> Style {
Style::default()
.fg(Color::Yellow)
.fg(Color::Magenta)
.add_modifier(Modifier::BOLD)
}

Expand Down

0 comments on commit 280ba9a

Please sign in to comment.