Added the standard control fonts to the Mac OS X backend. The GTK+ backend is fine as it stands.

This commit is contained in:
Pietro Gagliardi 2014-07-18 11:47:48 -04:00
parent f64f2781ce
commit 351c7cd9b2
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}