diff options
author | wolfsuit <wolfsuit> | 2002-09-22 07:46:52 (GMT) |
---|---|---|
committer | wolfsuit <wolfsuit> | 2002-09-22 07:46:52 (GMT) |
commit | 2c1f6a36c2979271ddf10c49eab31b0a26b349fb (patch) | |
tree | 5e3270fdc5ab0e134e7868a9a381d6b7dcddbb32 | |
parent | 54cfa15d4fc3958ac9a387965ae472bd82a8ba3c (diff) | |
download | tk-2c1f6a36c2979271ddf10c49eab31b0a26b349fb.zip tk-2c1f6a36c2979271ddf10c49eab31b0a26b349fb.tar.gz tk-2c1f6a36c2979271ddf10c49eab31b0a26b349fb.tar.bz2 |
2002-09-22 Jim Ingham <jingham@apple.com>
* macosx/tkMacOSXScrlbr.c (UpdateControlValue): HiliteControl
doesn't give the proper "nothing to scroll" look on Mac OS X.
You have to set the min value greater than the max value to
get this.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | macosx/tkMacOSXScrlbr.c | 23 |
2 files changed, 23 insertions, 7 deletions
@@ -1,3 +1,10 @@ +2002-09-22 Jim Ingham <jingham@apple.com> + + * macosx/tkMacOSXScrlbr.c (UpdateControlValue): HiliteControl + doesn't give the proper "nothing to scroll" look on Mac OS X. + You have to set the min value greater than the max value to + get this. + 2002-09-15 Mo DeJong <mdejong@users.sourceforge.net> * unix/configure: Regen. diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 12b4443..0b22c3e 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.2 2002/08/31 06:12:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.3 2002/09/22 07:46:53 wolfsuit Exp $ */ #include "tkScrollbar.h" @@ -252,9 +252,14 @@ TkpDisplayScrollbar( procID = kControlScrollBarLiveProc; windowRef = GetWindowFromPort(destPort); - macScrollPtr->sbHandle = NewControl(windowRef, &r, "\p", + CreateScrollBarControl (windowRef, &r, initialValue, + minValue, maxValue, + maxValue - minValue, true, + NULL, &(macScrollPtr->sbHandle)); + + /* macScrollPtr->sbHandle = NewControl(windowRef, &r, "\p", false, initialValue,minValue,maxValue, - procID, (SInt32) scrollPtr); + procID, (SInt32) scrollPtr); */ /* * If we are foremost then make us active. @@ -1056,20 +1061,24 @@ UpdateControlValues( */ middle = scrollPtr->firstFraction / (scrollPtr->firstFraction + (1.0 - scrollPtr->lastFraction)); - viewSize = (SInt32)((scrollPtr->lastFraction-scrollPtr->firstFraction) + + viewSize = (SInt32) ((scrollPtr->lastFraction - scrollPtr->firstFraction) * MAX_SCROLLBAR_DVALUE); + SetControlViewSize(macScrollPtr->sbHandle,viewSize); SetControlValue(macScrollPtr->sbHandle, (short) (middle * MAX_SCROLLBAR_VALUE) ); - contrlHilite=GetControlHilite(macScrollPtr->sbHandle); + contrlHilite = GetControlHilite(macScrollPtr->sbHandle); + SetControlMinimum(macScrollPtr->sbHandle, 0); if ( contrlHilite == 0 || contrlHilite == 255) { if (scrollPtr->firstFraction == 0.0 && scrollPtr->lastFraction == 1.0) { - HiliteControl(macScrollPtr->sbHandle,255); + SetControlMinimum(macScrollPtr->sbHandle, MAX_SCROLLBAR_VALUE); } else { - HiliteControl(macScrollPtr->sbHandle,0); + HiliteControl(macScrollPtr->sbHandle, 0); } } + if ( !IsControlVisible (macScrollPtr -> sbHandle) ) { SetControlVisibility(macScrollPtr->sbHandle,TRUE,FALSE); } |