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 b9ee7a3..d4aae8d 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);
@@ -74,11 +74,10 @@ static NSRect TkMacOSXGetButtonFrame(TkButton *butPtr);
if (x > parent_width - 50 || x < 0) {
return;
}
-
}
- }
[super drawRect:dirtyRect];
}
+ }
@end
@@ -136,7 +135,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 */
@@ -164,7 +163,7 @@ TkButton *
TkpCreateButton(
Tk_Window tkwin)
{
- MacButton *macButtonPtr = (MacButton *) ckalloc(sizeof(MacButton));
+ MacButton *macButtonPtr = ckalloc(sizeof(MacButton));
macButtonPtr->button = nil;
macButtonPtr->image = nil;
@@ -563,7 +562,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;
@@ -588,7 +587,7 @@ ComputeNativeButtonGeometry(
}
[button setButtonType:type];
if (style) {
- [button setBezelStyle:style];
+ [button setBezelStyle:style];
}
if (highlightsBy) {
[cell setHighlightsBy:highlightsBy|[cell highlightsBy]];
@@ -715,7 +714,7 @@ ComputeNativeButtonGeometry(
Tk_FontMetrics fm;
Tk_GetFontMetrics(butPtr->tkfont, &fm);
if (fm.linespace > 18) {
- [button setBezelStyle:(style = NSRegularSquareBezelStyle)];
+ [button setBezelStyle:(style = NSShadowlessSquareBezelStyle)];
}
}