diff options
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | src/Fl_Menu.cxx | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692, STR #730, STR #744, STR #745) + - Fixed menu item width calculations with symbols (STR + #740) - The keyboard shortcut handling code did not handle 8-bit characters properly (STR #731) - Fl_JPEG_Image could still crash an app with a corrupt diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 20bf39ab8..61e0dd98f 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -122,7 +122,9 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const { l.size = labelsize_ ? labelsize_ : m ? m->textsize() : (uchar)FL_NORMAL_SIZE; l.color = FL_BLACK; // this makes no difference? fl_draw_shortcut = 1; - int w = 0; int h = 0; l.measure(w, hp ? *hp : h); + int w = l.size; int h = l.size; + if (hp) *hp = h; + l.measure(w, hp ? *hp : h); fl_draw_shortcut = 0; if (flags & (FL_MENU_TOGGLE|FL_MENU_RADIO)) w += 14; return w; |
