summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--redo/controls_darwin.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/redo/controls_darwin.m b/redo/controls_darwin.m
index d8e0e51..f7554f5 100644
--- a/redo/controls_darwin.m
+++ b/redo/controls_darwin.m
@@ -6,6 +6,7 @@
#define toNSView(x) ((NSView *) (x))
#define toNSWindow(x) ((NSWindow *) (x))
+#define toNSControl(x) ((NSControl *) (x))
#define toNSButton(x) ((NSButton *) (x))
void unparent(id control)
@@ -22,6 +23,11 @@ void parent(id control, id parentid, BOOL floating)
[toNSView(control) release];
}
+static inline void setStandardControlFont(id control)
+{
+ [toNSControl(control) setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
+}
+
@interface goControlDelegate : NSObject {
@public
void *gocontrol;
@@ -48,6 +54,7 @@ id newButton(char *text)
[b setTitle:[NSString stringWithUTF8String:text]];
[b setBordered:YES];
[b setBezelStyle:NSRoundedBezelStyle];
+ setStandardControlFont(b);
return b;
}