From 7b4752428623f7317411a6ff18eccc8508a16b90 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Wed, 24 Dec 2025 13:56:08 +0900 Subject: [PATCH] improve submenu --- src/widget/submenu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget/submenu.c b/src/widget/submenu.c index 6492811..9eb6f78 100644 --- a/src/widget/submenu.c +++ b/src/widget/submenu.c @@ -116,7 +116,7 @@ static void click(MwWidget handle) { int th = MwTextHeight(handle, menu->sub[i]->name); rc.height = th; - if(rc.x <= handle->mouse_point.x && rc.y <= handle->mouse_point.y && handle->mouse_point.x <= (int)(rc.x + rc.width) && handle->mouse_point.y <= (int)(rc.y + rc.height)) { + if(rc.y <= handle->mouse_point.y && handle->mouse_point.y <= (int)(rc.y + rc.height)) { if(menu->sub[i]->wsub == NULL && arrlen(menu->sub[i]->sub) > 0) { MwPoint p; int j; @@ -183,7 +183,7 @@ static void mwSubMenuAppearImpl(MwWidget handle, MwMenu menu, MwPoint* point, in w += 10 + 15; h += 3; - if(w < 150) w = 150; + w += 32; if(diff_calc) { p.y = p.y - h;