summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2006-08-24 05:22:27 (GMT)
committerdas <das>2006-08-24 05:22:27 (GMT)
commit86610663094570936526ba513660875c9794532e (patch)
tree9d0cea340d20802e25bbe08813cb03def390272d
parente30df38aa55604a589afa30b477552e8210c7856 (diff)
downloadtk-86610663094570936526ba513660875c9794532e.zip
tk-86610663094570936526ba513660875c9794532e.tar.gz
tk-86610663094570936526ba513660875c9794532e.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.
-rw-r--r--ChangeLog6
-rw-r--r--macosx/tkMacOSXScrlbr.c15
2 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c14138..1c2ef7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-24 Daniel Steffen <das@users.sourceforge.net>
+
+ * 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.
+
2006-08-21 Daniel Steffen <das@users.sourceforge.net>
* macosx/tkMacOSXCarbonEvents.c (CarbonTimerProc): avoid starving main
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index abb52c8..d096c03 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.19 2006/04/28 06:02:49 das Exp $
+ * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.20 2006/08/24 05:22:27 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.