diff options
author | das <das> | 2006-08-24 05:22:33 (GMT) |
---|---|---|
committer | das <das> | 2006-08-24 05:22:33 (GMT) |
commit | 6c37b29c1dcfd4090f5a2a22478b978e76ed1738 (patch) | |
tree | 9f2cc4eecd5e331c97ca26ff692c74c3fdda244e /macosx/tkMacOSXScrlbr.c | |
parent | e6f8c277769e36f12769bf3650372df0cb6a976d (diff) | |
download | tk-6c37b29c1dcfd4090f5a2a22478b978e76ed1738.zip tk-6c37b29c1dcfd4090f5a2a22478b978e76ed1738.tar.gz tk-6c37b29c1dcfd4090f5a2a22478b978e76ed1738.tar.bz2 |
* macosx/tkMacOSXScrlbr.c (UpdateControlValues): set native scrollbar
control bounds only once all size adjustments have been computed.
Fixes issue with grow icon obscuring scrollbar reported on tcl-mac.
Diffstat (limited to 'macosx/tkMacOSXScrlbr.c')
-rw-r--r-- | macosx/tkMacOSXScrlbr.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 0fd3ffa..011b565 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.5.2.9 2006/04/28 06:03:00 das Exp $ + * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5.2.10 2006/08/24 05:22:33 das Exp $ */ #include "tkMacOSXInt.h" @@ -968,9 +968,6 @@ UpdateControlValues( * flicker. To avoid this we adjust the control record directly. The * Draw1Control command appears to just draw where ever the control says to * draw so this seems right. - * - * NOTE: changing the control record directly may not work when - * Apple releases the Copland version of the MacOS (or when hell is cold). */ contrlRect.left = macDraw->xOff + scrollPtr->inset; @@ -978,8 +975,6 @@ UpdateControlValues( contrlRect.right = macDraw->xOff + Tk_Width(tkwin) - scrollPtr->inset; contrlRect.bottom = macDraw->yOff + Tk_Height(tkwin) - scrollPtr->inset; - SetControlBounds(macScrollPtr->sbHandle, &contrlRect ); - /* * To make Tk applications look more like Macintosh applications without * requiring additional work by the Tk developer we do some cute tricks. @@ -999,7 +994,6 @@ UpdateControlValues( if ( portRect.left == contrlRect.left ) { if (macScrollPtr->macFlags & AUTO_ADJUST) { contrlRect.left--; - SetControlBounds ( macScrollPtr->sbHandle, &contrlRect ); } if (!(macScrollPtr->macFlags & FLUSH_LEFT)) { macScrollPtr->macFlags |= FLUSH_LEFT; @@ -1089,6 +1083,13 @@ UpdateControlValues( } /* + * Ensure we set scrollbar control bounds only once all size + * adjustments have been computed. + */ + + SetControlBounds(macScrollPtr->sbHandle, &contrlRect); + + /* * Given the Tk parameters for the fractions of the start and * end of the thumb, the following calculation determines the * location for the Macintosh thumb. |