summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXScrlbr.c
diff options
context:
space:
mode:
authorwolfsuit <wolfsuit>2002-11-20 05:21:08 (GMT)
committerwolfsuit <wolfsuit>2002-11-20 05:21:08 (GMT)
commitb4bd40a0b20ad19d615cfcaad4984928cba2895d (patch)
tree095307d540705fb2325938e9621a21419728a32a /macosx/tkMacOSXScrlbr.c
parent24c3d960bd1afa496713b700ed6ab10e92254400 (diff)
downloadtk-b4bd40a0b20ad19d615cfcaad4984928cba2895d.zip
tk-b4bd40a0b20ad19d615cfcaad4984928cba2895d.tar.gz
tk-b4bd40a0b20ad19d615cfcaad4984928cba2895d.tar.bz2
2002-11-19 Jim Ingham <jingham@apple.com>
* macosx/tkMacOSXScrlbr.c (TkpDisplayScrollbar): If the scrollbar width is set to 12 or less (but 12 is what you should use) use the small metric scrollbar. (UpdateControlValues): Fix thinko in setting off AUTO_ADJUST for the place geometry manager.
Diffstat (limited to 'macosx/tkMacOSXScrlbr.c')
-rw-r--r--macosx/tkMacOSXScrlbr.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 432aa1e..ecf7c59 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.4 2002/10/03 06:24:54 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5 2002/11/20 05:21:08 wolfsuit Exp $
*/
#include "tkScrollbar.h"
@@ -270,6 +270,18 @@ TkpDisplayScrollbar(
}
/*
+ * Adjust the control size based on its width...
+ */
+
+ if (macScrollPtr->info.width < 13) {
+ SetControlData(macScrollPtr->sbHandle, kControlNoPart, kControlSizeTag,
+ sizeof(kControlSizeSmall), (void *) kControlSizeSmall);
+ } else {
+ SetControlData(macScrollPtr->sbHandle, kControlNoPart, kControlSizeTag,
+ sizeof(kControlSizeSmall), (void *) kControlSizeLarge);
+ }
+
+ /*
* Update the control values before we draw.
*/
windowRef = GetControlOwner (macScrollPtr->sbHandle);
@@ -954,7 +966,7 @@ UpdateControlValues(
* the grow region if need be.
*/
if (!strcmp(macDraw->winPtr->geomMgrPtr->name, "place")) {
- macScrollPtr->macFlags &= AUTO_ADJUST;
+ macScrollPtr->macFlags &= ~AUTO_ADJUST;
} else {
macScrollPtr->macFlags |= AUTO_ADJUST;
}