# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1298840402 0 # Node ID 6d0f0dc7ff7c9d5daa740cc3138baa3423ec279c # Parent 388f2a48aaae09b94cb2775739e46b0232f0a92e Some minor font fixes. diff -r 388f2a48aaae -r 6d0f0dc7ff7c mac/dw.m --- a/mac/dw.m Sun Feb 27 19:25:21 2011 +0000 +++ b/mac/dw.m Sun Feb 27 21:00:02 2011 +0000 @@ -2714,7 +2714,9 @@ NSTextField *textfield = dw_text_new(text, id); [textfield setBordered:YES]; [textfield setBezeled:YES]; - [textfield setBezelStyle:NSRecessedBezelStyle]; + [textfield setBezelStyle:NSTextFieldSquareBezel]; + [textfield setBackgroundColor:[NSColor colorWithDeviceRed:1 green:1 blue:1 alpha: 0]]; + [textfield setDrawsBackground:NO]; return textfield; } @@ -4654,10 +4656,17 @@ *name = 0; name++; NSFont *font = [NSFont fontWithName:[ NSString stringWithUTF8String:name ] size:(float)size]; - id object = handle; - [object lockFocus]; - [font set]; - [object unlockFocus]; + if(font) + { + id object = handle; + if([object window]) + { + [object lockFocus]; + [font set]; + [object unlockFocus]; + } + [object setFont:font]; + } } free(fontcopy); return 0;