DOH! Fixed even more typos in my fix for Fl_Browser::item_height.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@424 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
f34388f29a
commit
05c916d353
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Browser.cxx,v 1.9.2.2 1999/03/13 20:25:09 bill Exp $"
|
||||
// "$Id: Fl_Browser.cxx,v 1.9.2.3 1999/03/13 20:35:33 bill Exp $"
|
||||
//
|
||||
// Browser widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -206,13 +206,13 @@ void Fl_Browser::data(int line, void* data) {
|
||||
int Fl_Browser::item_height(void* lv) const {
|
||||
FL_BLINE* l = (FL_BLINE*)lv;
|
||||
if (l->flags & NOTDISPLAYED) return 0;
|
||||
int hmax = 0;
|
||||
|
||||
int hmax = 2; // use 2 to insure we don't return a zero!
|
||||
// do each column sepeartely as they may all set different fonts:
|
||||
for (char* str = l->txt; *str; str++) {
|
||||
Fl_Font font = Fl_Font(0); // default font
|
||||
int size = textsize(); // default size
|
||||
while(*str==format_char())
|
||||
{
|
||||
while (*str==format_char()) {
|
||||
str++;
|
||||
switch (*str++) {
|
||||
case 'l': case 'L': size = 24; break;
|
||||
@ -223,20 +223,20 @@ int Fl_Browser::item_height(void* lv) const {
|
||||
case 'f': case 't': font = FL_COURIER; break;
|
||||
case 'S': size = strtol(str,&str,10); break;
|
||||
case 'F': font = (Fl_Font)strtol(str,&str,10); break;
|
||||
case 0: case '@': str--;
|
||||
case 0: case '@': str--;
|
||||
case '.': goto END_FORMAT;
|
||||
}
|
||||
}
|
||||
}
|
||||
END_FORMAT:
|
||||
char* ptr = str;
|
||||
for(;*str && (*str!=column_char()); str++) ;
|
||||
if (ptr < str) {
|
||||
fl_font(font, size); int h = fl_height();
|
||||
if (h > hmax) hmax = size;
|
||||
if (h > hmax) hmax = h;
|
||||
}
|
||||
}
|
||||
|
||||
return hmax+2;
|
||||
return hmax; // previous version returned hmax+2!
|
||||
}
|
||||
|
||||
int Fl_Browser::item_width(void* v) const {
|
||||
@ -475,5 +475,5 @@ int Fl_Browser::value() const {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Browser.cxx,v 1.9.2.2 1999/03/13 20:25:09 bill Exp $".
|
||||
// End of "$Id: Fl_Browser.cxx,v 1.9.2.3 1999/03/13 20:35:33 bill Exp $".
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user