improv(libcosmic): add window borders

This commit is contained in:
Vukašin Vojinović 2024-11-05 18:08:56 +01:00 committed by Ashley Wulber
parent ea4fe4bf6c
commit b074f0ceb1
2 changed files with 147 additions and 140 deletions

View file

@ -194,18 +194,21 @@ fn popover_menu(id: DefaultKey) -> cosmic::Element<'static, Message> {
),
popover_menu_row(id, fl!("keyboard-sources", "remove"), SourceContext::Remove),
])
.padding(8)
.padding([2, 8])
.width(Length::Shrink)
.height(Length::Shrink)
.apply(cosmic::widget::container)
.class(cosmic::theme::Container::custom(|theme| {
let cosmic = theme.cosmic();
let background = &cosmic.background;
container::Style {
icon_color: Some(theme.cosmic().background.on.into()),
text_color: Some(theme.cosmic().background.on.into()),
background: Some(Color::from(theme.cosmic().background.base).into()),
icon_color: Some(background.on.into()),
text_color: Some(background.on.into()),
background: Some(Color::from(background.base).into()),
border: Border {
radius: cosmic.corner_radii.radius_m.into(),
color: background.component.divider.into(),
width: 1.0,
radius: cosmic.corner_radii.radius_s.into(),
..Default::default()
},
shadow: Default::default(),