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.
This commit is contained in:
Matthias Melcher 2024-12-10 21:04:53 +01:00
parent 18a7a392a8
commit 0b320b1297

View File

@ -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;
}