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/Widget_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/Widget_Node.cxx')
| -rw-r--r-- | fluid/nodes/Widget_Node.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fluid/nodes/Widget_Node.cxx b/fluid/nodes/Widget_Node.cxx index 2082941ce..3d076b29b 100644 --- a/fluid/nodes/Widget_Node.cxx +++ b/fluid/nodes/Widget_Node.cxx @@ -2007,6 +2007,7 @@ void Widget_Node::write_properties(fld::io::Project_Writer &f) { if (!o->active()) f.write_string("deactivate"); if (resizable()) f.write_string("resizable"); if (hotspot()) f.write_string(is_a(Type::Menu_Item) ? "divider" : "hotspot"); + if (menu_headline()) f.write_string("headline"); for (int n=0; n < NUM_EXTRA_CODE; n++) if (extra_code(n)) { f.write_indent(level+1); f.write_string("code%d",n); @@ -2179,6 +2180,8 @@ void Widget_Node::read_property(fld::io::Project_Reader &f, const char *c) { resizable(1); } else if (!strcmp(c,"hotspot") || !strcmp(c, "divider")) { hotspot(1); + } else if (!strcmp(c,"headline")) { + menu_headline(true); } else if (!strcmp(c,"class")) { subclass(f.read_word()); } else if (!strcmp(c,"shortcut")) { |
