Skip to content

Commit

Permalink
style: Better styles for inputs and buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
fusetim committed Jul 31, 2023
1 parent 34985dd commit efd5247
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/views/widgets/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ pub struct Button {

impl Default for Button {
fn default() -> Button {
let focused_style = Style::default().bg(Color::LightRed);
let normal_style = Style::default().bg(Color::White);
let focused_style = Style::default().fg(Color::White).bg(Color::LightRed);
let normal_style = Style::default().fg(Color::Black).bg(Color::White);
let clicked_style = Style::default().add_modifier(Modifier::BOLD);
let disabled_style = Style::default().bg(Color::Gray);
let disabled_style = Style::default().fg(Color::Black).bg(Color::Gray);
let text = OwnedSpans::from("Button");
Button {
disabled_style,
Expand Down
6 changes: 3 additions & 3 deletions src/views/widgets/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ pub struct Input {
impl Default for Input {
fn default() -> Input {
Input {
style: Style::default().bg(Color::Gray),
focus_style: Style::default().bg(Color::LightRed),
disable_style: Style::default().add_modifier(Modifier::UNDERLINED),
style: Style::default().fg(Color::Black).bg(Color::Gray),
focus_style: Style::default().fg(Color::White).bg(Color::LightRed),
disable_style: Style::default().fg(Color::Black).add_modifier(Modifier::UNDERLINED),
placeholder: None,
placeholder_style: Style::default().add_modifier(Modifier::ITALIC),
horiz_constraint: Constraint::Percentage(100),
Expand Down

0 comments on commit efd5247

Please sign in to comment.