summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixScrlbr.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-10-07 14:31:02 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-10-07 14:31:02 (GMT)
commitf3b275a39528e851375932c49160e22acc6135c4 (patch)
treef27e5f8a71c3f371a5602556406cb10da1baf3c9 /unix/tkUnixScrlbr.c
parentcc829783411cb8d9f378d02078800ca05b0fc867 (diff)
downloadtk-f3b275a39528e851375932c49160e22acc6135c4.zip
tk-f3b275a39528e851375932c49160e22acc6135c4.tar.gz
tk-f3b275a39528e851375932c49160e22acc6135c4.tar.bz2
[Patch 2088597]: Stop scrollbars from getting too small at the end.
Diffstat (limited to 'unix/tkUnixScrlbr.c')
-rw-r--r--unix/tkUnixScrlbr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c
index beef224..a23bba1 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.6 2007/12/13 15:28:51 dgp Exp $
+ * RCS: @(#) $Id: tkUnixScrlbr.c,v 1.6.2.1 2009/10/07 14:31:02 dkf Exp $
*/
#include "tkInt.h"
@@ -303,8 +303,8 @@ 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;