fix(context menu): use radius from theme

This commit is contained in:
Vukašin Vojinović 2024-11-05 13:21:05 +01:00 • committed by Jeremy Soller
parent eba2eb38b7
commit a432f714de
4 changed files with 155 additions and 181 deletions

View file

@ -246,6 +246,7 @@ where
let state = tree.state.downcast_ref::<State>();
let cosmic_theme = theme.cosmic();
let radius_s = cosmic_theme.corner_radii.radius_s[0];
let scrollbar_w = f32::from(cosmic_theme.spacing.space_xxs);
let view_position = layout.position() + [self.padding.left, self.padding.top].into();
@ -279,7 +280,11 @@ where
renderer.fill_quad(
Quad {
bounds: layout.bounds(),
border: self.border,
border: Border {
radius: [0.0, 0.0, radius_s, radius_s].into(),
width: self.border.width,
color: self.border.color,
},
..Default::default()
},
Color::new(