mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
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:
+7
-7
@@ -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).
|
// 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 {
|
int Fl_Browser::item_height(void* lv) const {
|
||||||
FL_BLINE* l = (FL_BLINE*)lv;
|
FL_BLINE* l = (FL_BLINE*)lv;
|
||||||
if (l->flags & NOTDISPLAYED) return 0;
|
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++) {
|
for (char* str = l->txt; *str; str++) {
|
||||||
Fl_Font font = Fl_Font(0); // default font
|
Fl_Font font = Fl_Font(0); // default font
|
||||||
int size = textsize(); // default size
|
int size = textsize(); // default size
|
||||||
while(*str==format_char())
|
while (*str==format_char()) {
|
||||||
{
|
|
||||||
str++;
|
str++;
|
||||||
switch (*str++) {
|
switch (*str++) {
|
||||||
case 'l': case 'L': size = 24; break;
|
case 'l': case 'L': size = 24; break;
|
||||||
@@ -232,11 +232,11 @@ int Fl_Browser::item_height(void* lv) const {
|
|||||||
for(;*str && (*str!=column_char()); str++) ;
|
for(;*str && (*str!=column_char()); str++) ;
|
||||||
if (ptr < str) {
|
if (ptr < str) {
|
||||||
fl_font(font, size); int h = fl_height();
|
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 {
|
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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user