fix(app): border radius
Increases the border radius by 1.0 to prevent some corner artifacts.
This commit is contained in:
parent
bd28ae6581
commit
2ce3e95cf6
2 changed files with 3 additions and 2 deletions
|
|
@ -866,7 +866,8 @@ impl<App: Application> ApplicationExt for App {
|
||||||
border: iced::Border {
|
border: iced::Border {
|
||||||
color: theme.cosmic().bg_divider().into(),
|
color: theme.cosmic().bg_divider().into(),
|
||||||
width: if sharp_corners { 0.0 } else { 1.0 },
|
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()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ impl StyleSheet for Theme {
|
||||||
background: component.base.into(),
|
background: component.base.into(),
|
||||||
border_width: 1.0,
|
border_width: 1.0,
|
||||||
bar_border_radius: cosmic.corner_radii.radius_xl,
|
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(),
|
border_color: component.divider.into(),
|
||||||
background_expand: [1; 4],
|
background_expand: [1; 4],
|
||||||
path: component.hover.into(),
|
path: component.hover.into(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue