diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-02-15 15:24:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-15 15:24:25 +0100 |
| commit | 6fbfaba19d0a2d2dc7080e450d5055ff19ac89e1 (patch) | |
| tree | 8df0fc35817474ce6558bba94e739f5fef493d8d /fluid/Fl_Widget_Type.cxx | |
| parent | a4d0f7d269dc01e0a22c56aef13aa1f23405969a (diff) | |
Move class Fl_Shortcut_Button from FLUID to core (#677) (#680)
Diffstat (limited to 'fluid/Fl_Widget_Type.cxx')
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 76cc31b11..afdb61823 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -3019,7 +3019,10 @@ void Fl_Widget_Type::write_widget_code(Fd_Code_Writer& f) { else if (is_text_display()) shortcut = ((Fl_Text_Display*)o)->shortcut(); if (shortcut) { if (g_project.use_FL_COMMAND && (shortcut & (FL_CTRL|FL_META))) { - f.write_c("%s%s->shortcut(FL_COMMAND|0x%x);\n", f.indent(), var, shortcut & ~(FL_CTRL|FL_META)); + f.write_c("%s%s->shortcut(", f.indent(), var); + if (shortcut & FL_COMMAND) f.write_c("FL_COMMAND|"); + if (shortcut & FL_CONTROL) f.write_c("FL_CONTROL|"); + f.write_c("0x%x);\n", shortcut & ~(FL_CTRL|FL_META)); } else { f.write_c("%s%s->shortcut(0x%x);\n", f.indent(), var, shortcut); } |
