diff options
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r-- | macosx/tkMacOSXButton.c | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 61382c4..f912b81 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,8 +10,6 @@ * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id$ */ #include "tkMacOSXPrivate.h" @@ -81,6 +79,8 @@ static void ComputeUnixButtonGeometry(TkButton *butPtr); Tk_ClassProcs tkpButtonProcs = { sizeof(Tk_ClassProcs), /* size */ TkButtonWorldChanged, /* worldChangedProc */ + NULL, /* createProc */ + NULL /* modalProc */ }; @@ -245,27 +245,16 @@ TkpComputeButtonGeometry( */ void -TkpButtonSetDefaults( - Tk_OptionSpec *specPtr) /* Points to an array of option specs, - * terminated by one with type - * TK_OPTION_END. */ +TkpButtonSetDefaults() { #if TK_MAC_BUTTON_USE_COMPATIBILITY_METRICS if (!tkMacOSXUseCompatibilityMetrics) { - while (specPtr->type != TK_CONFIG_END) { - switch (specPtr->internalOffset) { - case Tk_Offset(TkButton, highlightWidth): - specPtr->defValue = DEF_BUTTON_HIGHLIGHT_WIDTH_NOCM; - break; - case Tk_Offset(TkButton, padX): - specPtr->defValue = DEF_BUTTON_PADX_NOCM; - break; - case Tk_Offset(TkButton, padY): - specPtr->defValue = DEF_BUTTON_PADY_NOCM; - break; - } - specPtr++; - } + strcpy(tkDefButtonHighlightWidth, DEF_BUTTON_HIGHLIGHT_WIDTH_NOCM); + strcpy(tkDefLabelHighlightWidth, DEF_BUTTON_HIGHLIGHT_WIDTH_NOCM); + strcpy(tkDefButtonPadx, DEF_BUTTON_PADX_NOCM); + strcpy(tkDefLabelPadx, DEF_BUTTON_PADX_NOCM); + strcpy(tkDefButtonPady, DEF_BUTTON_PADY_NOCM); + strcpy(tkDefLabelPady, DEF_BUTTON_PADY_NOCM); } #endif } @@ -588,12 +577,12 @@ ComputeNativeButtonGeometry( } // if font is too tall, we can't use the fixed-height rounded bezel - if (!haveImage && haveText && style == NSRoundedBezelStyle) { - Tk_FontMetrics fm; - Tk_GetFontMetrics(butPtr->tkfont, &fm); - if (fm.linespace > 18) { - [button setBezelStyle:(style = NSRegularSquareBezelStyle)]; - } + if (!haveImage && haveText && style == NSRoundedBezelStyle) { + Tk_FontMetrics fm; + Tk_GetFontMetrics(butPtr->tkfont, &fm); + if (fm.linespace > 18) { + [button setBezelStyle:(style = NSRegularSquareBezelStyle)]; + } } bounds.size = [cell cellSize]; @@ -673,7 +662,6 @@ ComputeNativeButtonGeometry( #endif } - #pragma mark - #pragma mark Unix Buttons: @@ -1183,7 +1171,7 @@ ComputeUnixButtonGeometry( /* * Local Variables: - * mode: c + * mode: objc * c-basic-offset: 4 * fill-column: 79 * coding: utf-8 |