diff --git a/CHANGES b/CHANGES index f04d8ed73..5e7239730 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ CHANGES IN FLTK 1.1.8 + - Fl_File_Browser did not calculate the width of + directory items correctly (STR #1470) - Fl_Pack incorrectly started widgets at an offset of 1/2 the spacing value. - FLUID did not generate correct window class code if diff --git a/src/Fl_File_Browser.cxx b/src/Fl_File_Browser.cxx index a09a61984..abb6ff697 100644 --- a/src/Fl_File_Browser.cxx +++ b/src/Fl_File_Browser.cxx @@ -3,7 +3,7 @@ // // Fl_File_Browser routines. // -// Copyright 1999-2005 by Michael Sweet. +// Copyright 1999-2006 by Michael Sweet. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -167,13 +167,16 @@ Fl_File_Browser::item_width(void *p) const // I - List item data const int *columns; // Columns - // Set the font and size... - fl_font(textfont(), textsize()); - // Scan for newlines... line = (FL_BLINE *)p; columns = column_widths(); + // Set the font and size... + if (line->txt[strlen(line->txt) - 1] == '/') + fl_font(textfont() | FL_BOLD, textsize()); + else + fl_font(textfont(), textsize()); + if (strchr(line->txt, '\n') == NULL && strchr(line->txt, column_char()) == NULL) {