Mercurial > dwindows
comparison mac/dw.m @ 673:6d0f0dc7ff7c
Some minor font fixes.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 27 Feb 2011 21:00:02 +0000 |
parents | 388f2a48aaae |
children | 78f9aa6d6d89 |
comparison
equal
deleted
inserted
replaced
672:388f2a48aaae | 673:6d0f0dc7ff7c |
---|---|
2712 HWND API dw_status_text_new(char *text, ULONG id) | 2712 HWND API dw_status_text_new(char *text, ULONG id) |
2713 { | 2713 { |
2714 NSTextField *textfield = dw_text_new(text, id); | 2714 NSTextField *textfield = dw_text_new(text, id); |
2715 [textfield setBordered:YES]; | 2715 [textfield setBordered:YES]; |
2716 [textfield setBezeled:YES]; | 2716 [textfield setBezeled:YES]; |
2717 [textfield setBezelStyle:NSRecessedBezelStyle]; | 2717 [textfield setBezelStyle:NSTextFieldSquareBezel]; |
2718 [textfield setBackgroundColor:[NSColor colorWithDeviceRed:1 green:1 blue:1 alpha: 0]]; | |
2719 [textfield setDrawsBackground:NO]; | |
2718 return textfield; | 2720 return textfield; |
2719 } | 2721 } |
2720 | 2722 |
2721 /* | 2723 /* |
2722 * Create a new static text window (widget) to be packed. | 2724 * Create a new static text window (widget) to be packed. |
4652 { | 4654 { |
4653 int size = atoi(fontcopy); | 4655 int size = atoi(fontcopy); |
4654 *name = 0; | 4656 *name = 0; |
4655 name++; | 4657 name++; |
4656 NSFont *font = [NSFont fontWithName:[ NSString stringWithUTF8String:name ] size:(float)size]; | 4658 NSFont *font = [NSFont fontWithName:[ NSString stringWithUTF8String:name ] size:(float)size]; |
4657 id object = handle; | 4659 if(font) |
4658 [object lockFocus]; | 4660 { |
4659 [font set]; | 4661 id object = handle; |
4660 [object unlockFocus]; | 4662 if([object window]) |
4663 { | |
4664 [object lockFocus]; | |
4665 [font set]; | |
4666 [object unlockFocus]; | |
4667 } | |
4668 [object setFont:font]; | |
4669 } | |
4661 } | 4670 } |
4662 free(fontcopy); | 4671 free(fontcopy); |
4663 return 0; | 4672 return 0; |
4664 } | 4673 } |
4665 | 4674 |