summaryrefslogtreecommitdiff
path: root/redo/controls_darwin.m
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-18 11:47:48 -0400
committerPietro Gagliardi <[email protected]>2014-07-18 11:47:48 -0400
commit351c7cd9b2fd11a69b2df469f6c99e30c691a0f1 (patch)
treeb052062f4a49988b4406cea7a281dd71127acc74 /redo/controls_darwin.m
parentf64f2781ce07d140ef450c6c56777da8728dc612 (diff)
Added the standard control fonts to the Mac OS X backend. The GTK+ backend is fine as it stands.
Diffstat (limited to 'redo/controls_darwin.m')
-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;
}