From 20dfd7c236208930634881ec52d22e7a353206dd Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 1 Jul 2026 12:32:33 -0400 Subject: [PATCH] cleanup: corner radius menu path logic --- src/widget/menu/menu_inner.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/widget/menu/menu_inner.rs b/src/widget/menu/menu_inner.rs index 220a6a7f..53c87415 100644 --- a/src/widget/menu/menu_inner.rs +++ b/src/widget/menu/menu_inner.rs @@ -821,15 +821,16 @@ impl<'b, Message: Clone + 'static> Menu<'b, Message> { let i = active.saturating_sub(start_index); let mut rad = styling.menu_border_radius; let rad_0 = theme.cosmic().radius_0(); - if start_index == end_index { - } else if 0 == i { - rad[0] = rad_0[0]; - rad[1] = rad_0[1]; - } else if i == end_index - start_index { - rad[2] = rad_0[2]; - rad[3] = rad_0[3]; - } else { - rad = rad_0; + if start_index != end_index { + if 0 == i { + rad[0] = rad_0[0]; + rad[1] = rad_0[1]; + } else if i == end_index - start_index { + rad[2] = rad_0[2]; + rad[3] = rad_0[3]; + } else { + rad = rad_0; + } } let path_quad = renderer::Quad { bounds: active_layout