diff options
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r-- | macosx/tkMacOSXButton.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 58383ca..f3405d7 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -58,7 +58,7 @@ static NSRect TkMacOSXGetButtonFrame(TkButton *butPtr); ) { return; } - /* Do not draw if the widget is completely outside of its parent, or within 20 pixels of the lower border; this prevents buttons from being drawn on peer widgets as scrolling occurs. */ + /* Do not draw if the widget is completely outside of its parent, or within 20 pixels of the lower border; this prevents buttons from being drawn on peer widgets as scrolling occurs. */ if (tkwin) { int parent_height = Tk_Height(Tk_Parent(tkwin)); int widget_height = Tk_Height(tkwin); @@ -73,11 +73,10 @@ static NSRect TkMacOSXGetButtonFrame(TkButton *butPtr); if (x > parent_width - 30 || x + widget_width < 0) { return; } - } - } [super drawRect:dirtyRect]; } + } @end @@ -135,7 +134,7 @@ static void ComputeUnixButtonGeometry(TkButton *butPtr); * The class procedure table for the button widgets. */ -Tk_ClassProcs tkpButtonProcs = { +const Tk_ClassProcs tkpButtonProcs = { sizeof(Tk_ClassProcs), /* size */ TkButtonWorldChanged, /* worldChangedProc */ NULL, /* createProc */ @@ -163,7 +162,7 @@ TkButton * TkpCreateButton( Tk_Window tkwin) { - MacButton *macButtonPtr = (MacButton *) ckalloc(sizeof(MacButton)); + MacButton *macButtonPtr = ckalloc(sizeof(MacButton)); macButtonPtr->button = nil; macButtonPtr->image = nil; @@ -562,7 +561,7 @@ ComputeNativeButtonGeometry( } break; case TYPE_RADIO_BUTTON: - case TYPE_CHECK_BUTTON: + case TYPE_CHECK_BUTTON: if (!haveImage /*|| butPtr->indicatorOn*/) { // TODO: indicatorOn type = butPtr->type == TYPE_RADIO_BUTTON ? NSRadioButton : NSSwitchButton; @@ -587,7 +586,7 @@ ComputeNativeButtonGeometry( } [button setButtonType:type]; if (style) { - [button setBezelStyle:style]; + [button setBezelStyle:style]; } if (highlightsBy) { [cell setHighlightsBy:highlightsBy|[cell highlightsBy]]; @@ -714,7 +713,7 @@ ComputeNativeButtonGeometry( Tk_FontMetrics fm; Tk_GetFontMetrics(butPtr->tkfont, &fm); if (fm.linespace > 18) { - [button setBezelStyle:(style = NSRegularSquareBezelStyle)]; + [button setBezelStyle:(style = NSShadowlessSquareBezelStyle)]; } } |