summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_Menu.cxx3
-rw-r--r--src/fl_draw.cxx4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 61e0dd98f..a5b993db8 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -122,8 +122,7 @@ 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 = l.size; int h = l.size;
- if (hp) *hp = h;
+ 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 += 14;
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx
index 6ff90a914..98d1b997a 100644
--- a/src/fl_draw.cxx
+++ b/src/fl_draw.cxx
@@ -295,12 +295,12 @@ void fl_measure(const char* str, int& w, int& h, int draw_symbols) {
*symptr++ = *str++);
*symptr = '\0';
if (isspace(*str)) str++;
- symwidth[0] = min(w,h);
+ symwidth[0] = h;
}
if (str && (p = strrchr(str, '@')) != NULL && p > (str + 1)) {
strlcpy(symbol[1], p, sizeof(symbol[1]));
- symwidth[1] = min(w,h);
+ symwidth[1] = h;
}
symtotal = symwidth[0] + symwidth[1];