From 94008f57c30eadff13217e3de733cb9895ee41e8 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 19 Nov 2025 16:57:02 +0100 Subject: Add headline menu item style (#1059) A menu item can be designated as a headline. Fully integrated and used in Fluid. --- fluid/nodes/Menu_Node.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fluid/nodes/Menu_Node.cxx') diff --git a/fluid/nodes/Menu_Node.cxx b/fluid/nodes/Menu_Node.cxx index f5555644c..342fcf014 100644 --- a/fluid/nodes/Menu_Node.cxx +++ b/fluid/nodes/Menu_Node.cxx @@ -128,7 +128,7 @@ void Input_Choice_Node::build_menu() { } m->shortcut(((Fl_Button*)(i->o))->shortcut()); m->callback(nullptr,(void*)i); - m->flags = i->flags(); + m->flags = i->flags() & ~FL_MENU_HEADLINE; m->labelfont(i->o->labelfont()); m->labelsize(i->o->labelsize()); m->labelcolor(i->o->labelcolor()); @@ -467,6 +467,7 @@ int Menu_Item_Node::flags() { else i |= FL_SUBMENU_POINTER; } if (hotspot()) i |= FL_MENU_DIVIDER; + if (menu_headline()) i |= FL_MENU_HEADLINE; return i; } @@ -697,7 +698,7 @@ void Menu_Base_Node::build_menu() { } m->shortcut(((Fl_Button*)(i->o))->shortcut()); m->callback(nullptr,(void*)i); - m->flags = i->flags() | i->o->type(); + m->flags = (i->flags() | i->o->type()) & ~FL_MENU_HEADLINE; m->labelfont(i->o->labelfont()); m->labelsize(i->o->labelsize()); m->labelcolor(i->o->labelcolor()); -- cgit v1.2.3