diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-02-05 18:36:59 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-02-05 18:36:59 +0000 |
| commit | 90590eb8b5eb3c3e7e8f1bc2e451264461133831 (patch) | |
| tree | 85d73cd457018359bf614ead2c1a8ec14da70f0a | |
| parent | 3124794f1fe6e7a5e0e201f6a3e773ed58ad1e5e (diff) | |
FLUID didn't use the label type constant names for menu items,
causing them to be drawn using the normal label type (STR #668)
fluid/Fl_Menu_Type.cxx:
- Use FL_*_LABEL constants instead of numeric label types in
menu items.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | fluid/Fl_Menu_Type.cxx | 19 |
2 files changed, 18 insertions, 4 deletions
@@ -1,5 +1,8 @@ CHANGES IN FLTK 1.1.7 + - FLUID didn't use the label type constant names for + menu items, causing them to be drawn using the normal + label type (STR #668) - Fl_File_Chooser was slow with large directories (STR #654) - FLUID didn't add xclass() calls to windows (STR #718) diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx index cdfdb12d5..08d109916 100644 --- a/fluid/Fl_Menu_Type.cxx +++ b/fluid/Fl_Menu_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Type.cxx,v 1.16.2.12.2.10 2004/11/21 14:53:48 easysw Exp $" +// "$Id$" // // Menu item code for the Fast Light Tool Kit (FLTK). // @@ -216,6 +216,17 @@ int Fl_Menu_Item_Type::flags() { } void Fl_Menu_Item_Type::write_item() { + static const char * const labeltypes[] = { + "FL_NORMAL_LABEL", + "FL_NO_LABEL", + "FL_SHADOW_LABEL", + "FL_ENGRAVED_LABEL", + "FL_EMBOSSED_LABEL", + "FL_MULTI_LABEL", + "FL_ICON_LABEL", + "FL_IMAGE_LABEL" + }; + write_c(" {"); if (image) write_c("0"); else if (label()) { @@ -254,8 +265,8 @@ void Fl_Menu_Item_Type::write_item() { write_c(" (void*)(%s),", user_data()); else write_c(" 0,"); - write_c(" %d, %d, %d, %d, %d", flags(), - o->labeltype(), o->labelfont(), o->labelsize(), o->labelcolor()); + write_c(" %d, %s, %d, %d, %d", flags(), + labeltypes[o->labeltype()], o->labelfont(), o->labelsize(), o->labelcolor()); write_c("},\n"); } @@ -468,5 +479,5 @@ void shortcut_in_cb(Shortcut_Button* i, void* v) { } // -// End of "$Id: Fl_Menu_Type.cxx,v 1.16.2.12.2.10 2004/11/21 14:53:48 easysw Exp $". +// End of "$Id$". // |
