summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXButton.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r--macosx/tkMacOSXButton.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 95611d0..9858f88 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);
@@ -66,11 +66,10 @@ static NSRect TkMacOSXGetButtonFrame(TkButton *butPtr);
if ( y > parent_height - 20 || y + widget_height < 0 ) {
return;
}
-
}
- }
[super drawRect:dirtyRect];
}
+ }
@end
@@ -128,7 +127,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 */
@@ -156,7 +155,7 @@ TkButton *
TkpCreateButton(
Tk_Window tkwin)
{
- MacButton *macButtonPtr = (MacButton *) ckalloc(sizeof(MacButton));
+ MacButton *macButtonPtr = ckalloc(sizeof(MacButton));
macButtonPtr->button = nil;
macButtonPtr->image = nil;
@@ -555,7 +554,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;
@@ -580,7 +579,7 @@ ComputeNativeButtonGeometry(
}
[button setButtonType:type];
if (style) {
- [button setBezelStyle:style];
+ [button setBezelStyle:style];
}
if (highlightsBy) {
[cell setHighlightsBy:highlightsBy|[cell highlightsBy]];
@@ -707,7 +706,7 @@ ComputeNativeButtonGeometry(
Tk_FontMetrics fm;
Tk_GetFontMetrics(butPtr->tkfont, &fm);
if (fm.linespace > 18) {
- [button setBezelStyle:(style = NSRegularSquareBezelStyle)];
+ [button setBezelStyle:(style = NSShadowlessSquareBezelStyle)];
}
}