cleanup: corner radius menu path logic
This commit is contained in:
parent
be499d01af
commit
20dfd7c236
1 changed files with 10 additions and 9 deletions
|
|
@ -821,15 +821,16 @@ impl<'b, Message: Clone + 'static> Menu<'b, Message> {
|
||||||
let i = active.saturating_sub(start_index);
|
let i = active.saturating_sub(start_index);
|
||||||
let mut rad = styling.menu_border_radius;
|
let mut rad = styling.menu_border_radius;
|
||||||
let rad_0 = theme.cosmic().radius_0();
|
let rad_0 = theme.cosmic().radius_0();
|
||||||
if start_index == end_index {
|
if start_index != end_index {
|
||||||
} else if 0 == i {
|
if 0 == i {
|
||||||
rad[0] = rad_0[0];
|
rad[0] = rad_0[0];
|
||||||
rad[1] = rad_0[1];
|
rad[1] = rad_0[1];
|
||||||
} else if i == end_index - start_index {
|
} else if i == end_index - start_index {
|
||||||
rad[2] = rad_0[2];
|
rad[2] = rad_0[2];
|
||||||
rad[3] = rad_0[3];
|
rad[3] = rad_0[3];
|
||||||
} else {
|
} else {
|
||||||
rad = rad_0;
|
rad = rad_0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let path_quad = renderer::Quad {
|
let path_quad = renderer::Quad {
|
||||||
bounds: active_layout
|
bounds: active_layout
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue