diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2000-03-17 09:38:20 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2000-03-17 09:38:20 +0000 |
| commit | ca15addad29e97d06a477895877e72b301a0529c (patch) | |
| tree | 766ec3a16626a5f5d600385ad356979940dc7b27 /src/Fl_Slider.cxx | |
| parent | 22418bb1e90b7c1b1d98ef56b03ae836fa63c46c (diff) | |
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
Diffstat (limited to 'src/Fl_Slider.cxx')
| -rw-r--r-- | src/Fl_Slider.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_Slider.cxx b/src/Fl_Slider.cxx index 9ef6e0b65..0bc8d0b29 100644 --- a/src/Fl_Slider.cxx +++ b/src/Fl_Slider.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Slider.cxx,v 1.8.2.4 1999/12/07 17:53:09 bill Exp $" +// "$Id: Fl_Slider.cxx,v 1.8.2.5 2000/03/17 09:38:20 bill Exp $" // // Slider widget for the Fast Light Tool Kit (FLTK). // @@ -185,8 +185,11 @@ int Fl_Slider::handle(int event, int x, int y, int w, int h) { int S = int(slider_size_*W+.5); int X; static int offcenter; + + double val = + (maximum()-minimum()) ? (value()-minimum())/(maximum()-minimum()) : 0.5; + if (type() == FL_HOR_FILL_SLIDER || type() == FL_VERT_FILL_SLIDER) { - double val = (value()-minimum())/(maximum()-minimum()); if (val >= 1.0) X = W; else if (val <= 0.0) X = 0; @@ -200,7 +203,6 @@ int Fl_Slider::handle(int event, int x, int y, int w, int h) { } S = 0; } else { - double val = (value()-minimum())/(maximum()-minimum()); if (val >= 1.0) X = W-S; else if (val <= 0.0) X = 0; @@ -249,5 +251,5 @@ int Fl_Slider::handle(int event) { } // -// End of "$Id: Fl_Slider.cxx,v 1.8.2.4 1999/12/07 17:53:09 bill Exp $". +// End of "$Id: Fl_Slider.cxx,v 1.8.2.5 2000/03/17 09:38:20 bill Exp $". // |
