feat: apply overlay to headerbar when it loses focus

This commit is contained in:
Ashley Wulber 2024-01-11 15:16:21 -05:00 committed by Ashley Wulber
parent 9fb3d874e1
commit 8157ed5c63
5 changed files with 245 additions and 15 deletions

View file

@ -385,18 +385,12 @@ impl container::StyleSheet for Theme {
}
Container::HeaderBar => {
let palette = self.cosmic();
let mut header_top = palette.background.base;
let header_bottom = palette.background.base;
header_top.alpha = 0.8;
let header_top = palette.background.base;
container::Appearance {
icon_color: Some(Color::from(palette.accent.base)),
text_color: Some(Color::from(palette.background.on)),
background: Some(iced::Background::Gradient(iced_core::Gradient::Linear(
Linear::new(Radians(PI))
.add_stop(0.0, header_top.into())
.add_stop(1.0, header_bottom.into()),
))),
background: Some(iced::Background::Color(header_top.into())),
border_radius: BorderRadius::from([
palette.corner_radii.radius_xs[0],
palette.corner_radii.radius_xs[3],