From 0b320b1297cef97199dec8e95df22e8e51521fb6 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 10 Dec 2024 21:04:53 +0100 Subject: [PATCH] Fix Fl_Menu_Item::measure width calculation (#1164) Fl_Menu_Item::measure did not take the gap between a possible checkbox and the label text into consideration. --- src/Fl_Menu.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 2a5bcd31ee..b85323ed25 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -266,7 +266,7 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const { int w = 0; int h = 0; l.measure(w, hp ? *hp : h); fl_draw_shortcut = 0; - if (flags & (FL_MENU_TOGGLE|FL_MENU_RADIO)) w += FL_NORMAL_SIZE; + if (flags & (FL_MENU_TOGGLE|FL_MENU_RADIO)) w += FL_NORMAL_SIZE + 4; return w; }