diff options
author | dkf <dkf@noemail.net> | 2009-10-07 14:33:26 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2009-10-07 14:33:26 (GMT) |
commit | f4bd77580fcf93717248cbafafaf23a07e4bec3b (patch) | |
tree | 83fc8cd3fe38b073d09df57f7b82cdf53ff2967d /unix | |
parent | c4177af070036338800cb9c5f9a7fbceea75f6a5 (diff) | |
download | tk-f4bd77580fcf93717248cbafafaf23a07e4bec3b.zip tk-f4bd77580fcf93717248cbafafaf23a07e4bec3b.tar.gz tk-f4bd77580fcf93717248cbafafaf23a07e4bec3b.tar.bz2 |
[Patch 2088597]: Stop scrollbars from getting too small at the end.
FossilOrigin-Name: 682faa82dc2e9d210c55875ca0c478af28917245
Diffstat (limited to 'unix')
-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) { |