diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-26 10:05:18 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-26 10:05:18 -0400 |
| commit | 2c810e7165cf78d8af6d79a7d6827792bf937122 (patch) | |
| tree | e9929db38cfe486d0b74e4a905d96f5329373f49 /redo/controls_darwin.m | |
| parent | e8df54cb825e7026a2e6f2fdaa15da1ab06cb607 (diff) | |
Verified Mac OS X control appearance and fonts with Interface Builder.
Diffstat (limited to 'redo/controls_darwin.m')
| -rw-r--r-- | redo/controls_darwin.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/redo/controls_darwin.m b/redo/controls_darwin.m index 198e363..73192c1 100644 --- a/redo/controls_darwin.m +++ b/redo/controls_darwin.m @@ -20,7 +20,7 @@ void controlSetHidden(id control, BOOL hidden) [toNSView(control) setHidden:hidden]; } -static inline void setStandardControlFont(id control) +void setStandardControlFont(id control) { [toNSControl(control) setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]]; } @@ -46,11 +46,10 @@ id newButton(void) // TODO cache the initial rect? b = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]; - // TODO verify all of these against Interface Builder - [b setButtonType:NSMomentaryLightButton]; + [b setButtonType:NSMomentaryPushInButton]; [b setBordered:YES]; [b setBezelStyle:NSRoundedBezelStyle]; - setStandardControlFont(b); + setStandardControlFont((id) b); return (id) b; } @@ -79,10 +78,9 @@ id newCheckbox(void) NSButton *c; c = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]; - // TODO verify all of these against Interface Builder [c setButtonType:NSSwitchButton]; [c setBordered:NO]; - setStandardControlFont(c); + setStandardControlFont((id) c); return (id) c; } @@ -105,7 +103,9 @@ void checkboxSetChecked(id c, BOOL checked) static id finishNewTextField(NSTextField *t) { - // TODO font + // same for text fields and password fields + setStandardControlFont((id) t); + // TODO border (Interface Builder setting is confusing) // TODO smart quotes // Interface Builder does this to make the text box behave properly // this disables both word wrap AND ellipsizing in one fell swoop |
