fix
This commit is contained in:
parent
96c67e29a4
commit
a6db807c1b
2 changed files with 23 additions and 28 deletions
|
|
@ -882,30 +882,7 @@ impl<App: Application> ApplicationExt for App {
|
|||
header = header.end(element.map(Message::App));
|
||||
}
|
||||
|
||||
header
|
||||
// Needed for apps without a content container, but with a header bar
|
||||
.apply(container)
|
||||
.style(move |theme| container::Style {
|
||||
background: if content_container {
|
||||
None
|
||||
} else {
|
||||
Some(iced::Background::Color(
|
||||
theme.cosmic().background.base.into(),
|
||||
))
|
||||
},
|
||||
border: iced::Border {
|
||||
radius: [
|
||||
theme.cosmic().radius_s()[0] - 1.0,
|
||||
theme.cosmic().radius_s()[1] - 1.0,
|
||||
theme.cosmic().radius_0()[2],
|
||||
theme.cosmic().radius_0()[3],
|
||||
]
|
||||
.into(),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
})
|
||||
.apply(|w| id_container(w, iced_core::id::Id::new("COSMIC_header")))
|
||||
header.apply(|w| id_container(w, iced_core::id::Id::new("COSMIC_header")))
|
||||
})
|
||||
} else {
|
||||
None
|
||||
|
|
|
|||
|
|
@ -469,8 +469,17 @@ impl iced_container::Catalog for Theme {
|
|||
Container::WindowBackground => iced_container::Style {
|
||||
icon_color: Some(Color::from(cosmic.background.on)),
|
||||
text_color: Some(Color::from(cosmic.background.on)),
|
||||
background: None,
|
||||
border: Border::default(),
|
||||
background: Some(iced::Background::Color(cosmic.background.base.into())),
|
||||
border: Border {
|
||||
radius: [
|
||||
cosmic.corner_radii.radius_0[0],
|
||||
cosmic.corner_radii.radius_0[1],
|
||||
cosmic.corner_radii.radius_s[2],
|
||||
cosmic.corner_radii.radius_s[3],
|
||||
]
|
||||
.into(),
|
||||
..Default::default()
|
||||
},
|
||||
shadow: Shadow::default(),
|
||||
},
|
||||
|
||||
|
|
@ -504,8 +513,17 @@ impl iced_container::Catalog for Theme {
|
|||
iced_container::Style {
|
||||
icon_color: Some(icon_color),
|
||||
text_color: Some(text_color),
|
||||
background: None,
|
||||
border: Border::default(),
|
||||
background: Some(iced::Background::Color(cosmic.background.base.into())),
|
||||
border: Border {
|
||||
radius: [
|
||||
cosmic.corner_radii.radius_s[0],
|
||||
cosmic.corner_radii.radius_s[1],
|
||||
cosmic.corner_radii.radius_0[2],
|
||||
cosmic.corner_radii.radius_0[3],
|
||||
]
|
||||
.into(),
|
||||
..Default::default()
|
||||
},
|
||||
shadow: Shadow::default(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue