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 5d19ca3..38c35f4 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.9 2007/06/03 13:44:40 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.10 2007/06/06 09:55:52 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;
}
/*