fix(app): border radius

Increases the border radius by 1.0 to prevent some corner artifacts.
This commit is contained in:
Vukašin Vojinović 2024-11-05 23:08:42 +01:00 committed by Jeremy Soller
parent bd28ae6581
commit 2ce3e95cf6
2 changed files with 3 additions and 2 deletions

View file

@ -866,7 +866,8 @@ impl<App: Application> ApplicationExt for App {
border: iced::Border {
color: theme.cosmic().bg_divider().into(),
width: if sharp_corners { 0.0 } else { 1.0 },
radius: theme.cosmic().radius_s().map(|x| x + 1.0).into(),
// x + 2.0 is used to prevent corner artifacts
radius: theme.cosmic().radius_s().map(|x| x + 2.0).into(),
},
..Default::default()
});

View file

@ -69,7 +69,7 @@ impl StyleSheet for Theme {
background: component.base.into(),
border_width: 1.0,
bar_border_radius: cosmic.corner_radii.radius_xl,
menu_border_radius: cosmic.corner_radii.radius_s,
menu_border_radius: cosmic.corner_radii.radius_s.map(|x| x + 2.0),
border_color: component.divider.into(),
background_expand: [1; 4],
path: component.hover.into(),