diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2009-10-07 14:33:27 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2009-10-07 14:33:27 (GMT) |
commit | f52b83fbbc3cf4f0d32d29f4dd848f1e5c10fed2 (patch) | |
tree | 83fc8cd3fe38b073d09df57f7b82cdf53ff2967d /unix/tkUnixScrlbr.c | |
parent | 6a61440fd1401552ac4e26d49f6ae3c931132731 (diff) | |
download | tk-f52b83fbbc3cf4f0d32d29f4dd848f1e5c10fed2.zip tk-f52b83fbbc3cf4f0d32d29f4dd848f1e5c10fed2.tar.gz tk-f52b83fbbc3cf4f0d32d29f4dd848f1e5c10fed2.tar.bz2 |
[Patch 2088597]: Stop scrollbars from getting too small at the end.
Diffstat (limited to 'unix/tkUnixScrlbr.c')
-rw-r--r-- | unix/tkUnixScrlbr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c index bf210e2..2ca0a2e 100644 --- a/unix/tkUnixScrlbr.c +++ b/unix/tkUnixScrlbr.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixScrlbr.c,v 1.7 2008/12/09 23:21:48 dkf Exp $ + * RCS: @(#) $Id: tkUnixScrlbr.c,v 1.8 2009/10/07 14:33:27 dkf Exp $ */ #include "tkInt.h" @@ -305,14 +305,13 @@ TkpComputeScrollbarGeometry( * grabbed with the mouse). */ - if (scrollPtr->sliderFirst > (fieldLength - 2*scrollPtr->borderWidth)) { - scrollPtr->sliderFirst = fieldLength - 2*scrollPtr->borderWidth; + if (scrollPtr->sliderFirst > fieldLength - MIN_SLIDER_LENGTH) { + scrollPtr->sliderFirst = fieldLength - MIN_SLIDER_LENGTH; } if (scrollPtr->sliderFirst < 0) { scrollPtr->sliderFirst = 0; } - if (scrollPtr->sliderLast < (scrollPtr->sliderFirst - + MIN_SLIDER_LENGTH)) { + if (scrollPtr->sliderLast < scrollPtr->sliderFirst + MIN_SLIDER_LENGTH) { scrollPtr->sliderLast = scrollPtr->sliderFirst + MIN_SLIDER_LENGTH; } if (scrollPtr->sliderLast > fieldLength) { |