summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-05-07 16:07:42 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-05-07 20:05:27 +0200
commit60690dba51a50c5ae3aef035b3b824f3646f2e3d (patch)
tree563818e56395ba79471d0ff78639424e2334bde9 /src
parent7430ebff977e3b96942dc65c721488f041e2521e (diff)
Limit (sub)menu arrow size as discussed in fltk.general
... in thread: "FLTK 1.4 Menu Bar Style", started on May 6, 2024 This is about the little triangle (or similar) pointing right when a submenu exists in a menu. The arrow form differs per scheme.
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Menu.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 003cb6a17..0e7169a23 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -537,6 +537,7 @@ void menuwindow::drawentry(const Fl_Menu_Item* m, int n, int eraseit) {
// calculate the bounding box of the submenu pointer (arrow)
int sz = (hh-2) & -2;
+ if (sz > 12) sz = 12; // limit arrow size => max(d) = (sz-2)/2 = 5
int x1 = xx + ww - sz - 2;
int y1 = yy + (hh-sz)/2 + 1;