mirror of
https://github.com/fltk/fltk.git
synced 2026-05-24 16:36:37 +08:00
Fixed long-standing bug reported by Rick Sayre in Fl_Browser_ - if the
draw code added a horizontal scrollbar it might not add the vertical one until the next redraw. Added FreeBSD to the list of platforms needing the scandir function cast. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@718 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+20
-2
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Browser_.cxx,v 1.10.2.2 1999/06/07 07:03:32 bill Exp $"
|
||||
// "$Id: Fl_Browser_.cxx,v 1.10.2.3 1999/09/15 15:18:11 mike Exp $"
|
||||
//
|
||||
// Base Browser widget class for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -268,6 +268,24 @@ J1:
|
||||
}
|
||||
}
|
||||
|
||||
// Check the vertical scrollbar again, just in case it needs to be drawn
|
||||
// because the horizontal one is drawn. There should be a cleaner way
|
||||
// to do this besides copying the same code...
|
||||
if ((has_scrollbar_ & VERTICAL) && (
|
||||
(has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) {
|
||||
if (!scrollbar.visible()) {
|
||||
scrollbar.set_visible();
|
||||
drawsquare = 1;
|
||||
bbox(X, Y, W, H);
|
||||
}
|
||||
} else {
|
||||
top_ = item_first(); real_position_ = offset_ = 0;
|
||||
if (scrollbar.visible()) {
|
||||
scrollbar.clear_visible();
|
||||
clear_damage(damage()|FL_DAMAGE_SCROLL);
|
||||
}
|
||||
}
|
||||
|
||||
bbox(X, Y, W, H);
|
||||
|
||||
fl_clip(X, Y, W, H);
|
||||
@@ -647,5 +665,5 @@ void Fl_Browser_::item_select(void*, int) {}
|
||||
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Browser_.cxx,v 1.10.2.2 1999/06/07 07:03:32 bill Exp $".
|
||||
// End of "$Id: Fl_Browser_.cxx,v 1.10.2.3 1999/09/15 15:18:11 mike Exp $".
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: filename_list.cxx,v 1.10 1999/02/22 20:54:44 mike Exp $"
|
||||
// "$Id: filename_list.cxx,v 1.10.2.1 1999/09/15 15:18:12 mike Exp $"
|
||||
//
|
||||
// Filename list routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -40,7 +40,7 @@ extern "C" {
|
||||
}
|
||||
|
||||
int filename_list(const char *d, dirent ***list) {
|
||||
#if defined(_AIX) || defined(CRAY) || defined(linux)
|
||||
#if defined(_AIX) || defined(CRAY) || defined(linux) || defined(__FreeBSD__)
|
||||
// on some systems you may need to do this, due to a rather common
|
||||
// error in the prototype for the sorting function, where a level
|
||||
// of pointer indirection is missing:
|
||||
@@ -55,5 +55,5 @@ int filename_list(const char *d, dirent ***list) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: filename_list.cxx,v 1.10 1999/02/22 20:54:44 mike Exp $".
|
||||
// End of "$Id: filename_list.cxx,v 1.10.2.1 1999/09/15 15:18:12 mike Exp $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user