From ca15addad29e97d06a477895877e72b301a0529c Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Fri, 17 Mar 2000 09:38:20 +0000 Subject: Fixed up the colors the browser draws when it is deactivated, it does not change the background color, this fixes Jeff Meininger's demo. Fl_Input allows ^I, ^J, ^L, and ^M to be typed as control characters and inserted. If you type ^H or ^? they act like backspace and delete. Clicking on an input field no longer selects the whole thing, it inserts the cursor. My tests of Win32 to see what they did were wrong, this is a better simulation and more user friendly, too. Fixed divide-by-zer in the slider code? Better osf code for filename_list from Alexander Mai git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1042 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Scrollbar.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/Fl_Scrollbar.cxx') diff --git a/src/Fl_Scrollbar.cxx b/src/Fl_Scrollbar.cxx index 4f05ef761..24099ec1b 100644 --- a/src/Fl_Scrollbar.cxx +++ b/src/Fl_Scrollbar.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Scrollbar.cxx,v 1.7.2.7 2000/01/20 06:14:32 bill Exp $" +// "$Id: Fl_Scrollbar.cxx,v 1.7.2.8 2000/03/17 09:38:19 bill Exp $" // // Scroll bar widget for the Fast Light Tool Kit (FLTK). // @@ -85,11 +85,8 @@ int Fl_Scrollbar::handle(int event) { int S = int(slider_size()*ww+.5); int T = (horizontal() ? H : W)/2+1; if (S < T) S = T; - double val; - if (minimum() == maximum()) - val = 0.5; - else - val = (value()-minimum())/(maximum()-minimum()); + double val = + (maximum()-minimum()) ? (value()-minimum())/(maximum()-minimum()) : 0.5; int sliderx; if (val >= 1.0) sliderx = ww-S; else if (val <= 0.0) sliderx = 0; @@ -239,5 +236,5 @@ Fl_Scrollbar::Fl_Scrollbar(int X, int Y, int W, int H, const char* L) } // -// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.7 2000/01/20 06:14:32 bill Exp $". +// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.8 2000/03/17 09:38:19 bill Exp $". // -- cgit v1.2.3