mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
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:
+1
-1
@@ -266,7 +266,7 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const {
|
|||||||
int w = 0; int h = 0;
|
int w = 0; int h = 0;
|
||||||
l.measure(w, hp ? *hp : h);
|
l.measure(w, hp ? *hp : h);
|
||||||
fl_draw_shortcut = 0;
|
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;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user