diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-11-19 16:57:02 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-11-19 16:58:08 +0100 |
| commit | 94008f57c30eadff13217e3de733cb9895ee41e8 (patch) | |
| tree | 905b8557229266ea825ae4959a96ed04ecfeecf1 /fluid/nodes/Menu_Node.cxx | |
| parent | 2182bd60c0cabbb6cf65ca953d4643ec03006725 (diff) | |
Add headline menu item style (#1059)
A menu item can be designated as a headline.
Fully integrated and used in Fluid.
Diffstat (limited to 'fluid/nodes/Menu_Node.cxx')
| -rw-r--r-- | fluid/nodes/Menu_Node.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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()); |
