Use terminal colors for dialog buttons

This commit is contained in:
mars 2022-11-18 13:15:34 -07:00
parent 6db0c72f4d
commit 85e1fbd6b6
1 changed files with 5 additions and 3 deletions

View File

@ -23,8 +23,8 @@ impl DialogResponse {
pub fn get_color(&self) -> Color {
match self {
DialogResponse::Yes => Color::BLUE,
DialogResponse::No => Color::RED,
DialogResponse::Yes => THEME.palette.blue,
DialogResponse::No => THEME.palette.red,
}
}
}
@ -95,6 +95,7 @@ pub struct DialogFooterStyle {
pub icon_font: Font,
pub button_radius: f32,
pub color: Color,
pub button_fg: Color,
pub height: f32,
}
@ -104,6 +105,7 @@ impl Default for DialogFooterStyle {
icon_font: Font::new(crate::ICON_FONT),
button_radius: 7.5,
color: THEME.palette.surface,
button_fg: THEME.palette.white,
height: 15.0,
}
}
@ -136,7 +138,7 @@ impl Dialog {
thickness: radius * 0.05,
body_color: color,
ring_color: color,
icon_color: Color::WHITE,
icon_color: style.footer.button_fg,
};
let text = LabelText {