From 1ac70e653b0bffb1516beb435e282591b0ddb420 Mon Sep 17 00:00:00 2001 From: mars Date: Fri, 18 Nov 2022 13:08:28 -0700 Subject: [PATCH] Use THEME in dialog style defaults --- scripts/sao-ui/src/widgets/dialog.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/sao-ui/src/widgets/dialog.rs b/scripts/sao-ui/src/widgets/dialog.rs index f8dea23..6f7aabb 100644 --- a/scripts/sao-ui/src/widgets/dialog.rs +++ b/scripts/sao-ui/src/widgets/dialog.rs @@ -40,7 +40,7 @@ pub struct DialogStyle { impl Default for DialogStyle { fn default() -> Self { Self { - rounding: 5.0, + rounding: THEME.metrics.surface_rounding, header: Default::default(), body: Default::default(), footer: Default::default(), @@ -61,10 +61,10 @@ pub struct DialogHeaderStyle { impl Default for DialogHeaderStyle { fn default() -> Self { Self { - color: Color::WHITE, + color: THEME.palette.surface, height: 20.0, text_font: Font::new(crate::DISPLAY_FONT), - text_color: Color::BLACK, + text_color: THEME.palette.text, text_scale_factor: 0.65, text_baseline: 0.25, } @@ -82,9 +82,9 @@ pub struct DialogBodyStyle { impl Default for DialogBodyStyle { fn default() -> Self { Self { - color: Color::WHITE.with_alpha(0xb0), + color: THEME.palette.base, text_font: Font::new(crate::CONTENT_FONT), - text_color: Color::BLACK, + text_color: THEME.palette.text, text_size: 5.0, } } @@ -103,7 +103,7 @@ impl Default for DialogFooterStyle { Self { icon_font: Font::new(crate::ICON_FONT), button_radius: 7.5, - color: Color::WHITE, + color: THEME.palette.surface, height: 15.0, } }