diff options
| author | Matthias Melcher <github@matthiasm.com> | 2024-12-10 21:04:53 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2024-12-10 21:04:53 +0100 |
| commit | 0b320b1297cef97199dec8e95df22e8e51521fb6 (patch) | |
| tree | fff94d3f527be5d69ea6f102bf5e41063e9301f1 /src/Fl_Menu.cxx | |
| parent | 18a7a392a8cb173f1125d804ffd59d7e8c03255a (diff) | |
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.
Diffstat (limited to 'src/Fl_Menu.cxx')
| -rw-r--r-- | src/Fl_Menu.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 2a5bcd31e..b85323ed2 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -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; } |
