summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXScrlbr.c
diff options
context:
space:
mode:
authordas <das>2006-08-24 05:22:33 (GMT)
committerdas <das>2006-08-24 05:22:33 (GMT)
commit7f475d7962d8fe7ea9f615f3b14b92de1ddef483 (patch)
tree9f2cc4eecd5e331c97ca26ff692c74c3fdda244e /macosx/tkMacOSXScrlbr.c
parent349b0c50e58653dc052efe4b07dfd25e13e1abc6 (diff)
downloadtk-7f475d7962d8fe7ea9f615f3b14b92de1ddef483.zip
tk-7f475d7962d8fe7ea9f615f3b14b92de1ddef483.tar.gz
tk-7f475d7962d8fe7ea9f615f3b14b92de1ddef483.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.c15
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.