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)
commit1b0c4a1cbc8bb29f46cc910618e738000208e4e4 (patch)
tree095307d540705fb2325938e9621a21419728a32a /macosx/tkMacOSXScrlbr.c
parent1c78ba6b98cbe17b2e461df0d7b9af4ca7ef0f79 (diff)
downloadtk-1b0c4a1cbc8bb29f46cc910618e738000208e4e4.zip
tk-1b0c4a1cbc8bb29f46cc910618e738000208e4e4.tar.gz
tk-1b0c4a1cbc8bb29f46cc910618e738000208e4e4.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;
}