Skip to content

Commit

Permalink
Fix Fl_Menu_Item::measure width calculation (fltk#1164)
Browse files Browse the repository at this point in the history
Fl_Menu_Item::measure did not take the gap between a possible
checkbox and the label text into consideration.
  • Loading branch information
MatthiasWM committed Dec 10, 2024
1 parent 18a7a39 commit 0b320b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fl_Menu.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0b320b1

Please sign in to comment.