diff --git a/src/theme/mod.rs b/src/theme/mod.rs index 851fcf5..2775f3a 100644 --- a/src/theme/mod.rs +++ b/src/theme/mod.rs @@ -694,19 +694,15 @@ impl svg::StyleSheet for Theme { /* * TODO: Text */ -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Default)] pub enum Text { + Accent, + #[default] Default, Color(Color), Custom(fn(&Theme) -> text::Appearance), } -impl Default for Text { - fn default() -> Self { - Self::Default - } -} - impl From for Text { fn from(color: Color) -> Self { Text::Color(color) @@ -718,6 +714,9 @@ impl text::StyleSheet for Theme { fn appearance(&self, style: Self::Style) -> text::Appearance { match style { + Text::Accent => text::Appearance { + color: Some(self.cosmic().accent.base.into()) + }, Text::Default => Default::default(), Text::Color(c) => text::Appearance { color: Some(c) }, Text::Custom(f) => f(self), diff --git a/src/widget/header_bar.rs b/src/widget/header_bar.rs index 41bd7b4..7fe7381 100644 --- a/src/widget/header_bar.rs +++ b/src/widget/header_bar.rs @@ -69,6 +69,7 @@ impl Component for HeaderBar { fn view(&self, _state: &Self::State) -> Element { let nav_button = { let text = widget::text(&self.nav_title) + .style(theme::Text::Accent) .vertical_alignment(Vertical::Center) .width(Length::Shrink) .height(Length::Fill); @@ -81,6 +82,7 @@ impl Component for HeaderBar { }, 24, ) + .style(theme::Svg::Accent) .width(Length::Units(24)) .height(Length::Fill); @@ -88,7 +90,7 @@ impl Component for HeaderBar { .padding(4) .spacing(4) .apply(widget::button) - .style(theme::Button::Primary) + .style(theme::Button::Secondary) .on_press(HeaderEvent::ToggleSidebar) .apply(widget::container) .center_y()