summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEntry.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXEntry.c')
-rw-r--r--macosx/tkMacOSXEntry.c51
1 files changed, 24 insertions, 27 deletions
diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c
index c412f31..8533932 100644
--- a/macosx/tkMacOSXEntry.c
+++ b/macosx/tkMacOSXEntry.c
@@ -53,7 +53,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.2.2.9 2007/06/04 09:28:44 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.2.2.10 2007/06/06 09:56:54 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -80,40 +80,37 @@ static ThemeButtonKind ComputeIncDecParameters (int height, int *width);
*--------------------------------------------------------------
*/
static ThemeButtonKind
-ComputeIncDecParameters (int height, int *width)
+ComputeIncDecParameters(int height, int *width)
{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
- if (1
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1030
- && &kHIToolboxVersionNumber != NULL
- && kHIToolboxVersionNumber >= kHIToolboxVersionNumber10_3
-#endif
- ) {
+ ThemeButtonKind kind;
+
+ TK_IF_MAC_OS_X_HI_TOOLBOX (3,
if (height < 11 || height > 28) {
*width = 0;
- return (ThemeButtonKind) 0;
- }
-
- if (height >= 21) {
- *width = 13;
- return kThemeIncDecButton;
- } else if (height >= 18) {
- *width = 12;
- return kThemeIncDecButtonSmall;
+ kind = (ThemeButtonKind) 0;
} else {
- *width = 11;
- return kThemeIncDecButtonMini;
+ if (height >= 21) {
+ *width = 13;
+ kind = kThemeIncDecButton;
+ } else if (height >= 18) {
+ *width = 12;
+ kind = kThemeIncDecButtonSmall;
+ } else {
+ *width = 11;
+ kind = kThemeIncDecButtonMini;
+ }
}
- } else
-#endif
- {
+ ) TK_ELSE_MAC_OS_X (3,
if (height < 21 || height > 28) {
*width = 0;
- return (ThemeButtonKind) 0;
+ kind = (ThemeButtonKind) 0;
+ } else {
+ *width = 13;
+ kind = kThemeIncDecButton;
}
- *width = 13;
- return kThemeIncDecButton;
- }
+ ) TK_ENDIF_MAC_OS_X
+
+ return kind;
}
/*