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
This commit is contained in:
Michael R Sweet 2005-02-05 18:36:59 +00:00
parent 3124794f1f
commit 90590eb8b5
2 changed files with 18 additions and 4 deletions

View File

@ -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)

View File

@ -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$".
//