Added the standard control fonts to the Mac OS X backend. The GTK+ backend is fine as it stands.
This commit is contained in:
parent
f64f2781ce
commit
351c7cd9b2
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#define toNSView(x) ((NSView *) (x))
|
#define toNSView(x) ((NSView *) (x))
|
||||||
#define toNSWindow(x) ((NSWindow *) (x))
|
#define toNSWindow(x) ((NSWindow *) (x))
|
||||||
|
#define toNSControl(x) ((NSControl *) (x))
|
||||||
#define toNSButton(x) ((NSButton *) (x))
|
#define toNSButton(x) ((NSButton *) (x))
|
||||||
|
|
||||||
void unparent(id control)
|
void unparent(id control)
|
||||||
|
@ -22,6 +23,11 @@ void parent(id control, id parentid, BOOL floating)
|
||||||
[toNSView(control) release];
|
[toNSView(control) release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void setStandardControlFont(id control)
|
||||||
|
{
|
||||||
|
[toNSControl(control) setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
|
||||||
|
}
|
||||||
|
|
||||||
@interface goControlDelegate : NSObject {
|
@interface goControlDelegate : NSObject {
|
||||||
@public
|
@public
|
||||||
void *gocontrol;
|
void *gocontrol;
|
||||||
|
@ -48,6 +54,7 @@ id newButton(char *text)
|
||||||
[b setTitle:[NSString stringWithUTF8String:text]];
|
[b setTitle:[NSString stringWithUTF8String:text]];
|
||||||
[b setBordered:YES];
|
[b setBordered:YES];
|
||||||
[b setBezelStyle:NSRoundedBezelStyle];
|
[b setBezelStyle:NSRoundedBezelStyle];
|
||||||
|
setStandardControlFont(b);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue