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.
This commit is contained in:
Albrecht Schlosser 2024-05-07 16:07:42 +02:00
parent 7430ebff97
commit 60690dba51
1 changed files with 1 additions and 0 deletions

View File

@ -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;