comparison mac/dw.m @ 931:dfd84cefd80b

Minor changes to vertical centering on (status) text fields on the Mac. Allow removing of vertical centering and default status text fields to be vertically centered.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 25 Apr 2011 16:08:23 +0000
parents b6ee515cad8a
children ed10b5284f36
comparison
equal deleted inserted replaced
930:b6ee515cad8a 931:dfd84cefd80b
4376 [textfield setBezeled:YES]; 4376 [textfield setBezeled:YES];
4377 [textfield setBezelStyle:NSTextFieldSquareBezel]; 4377 [textfield setBezelStyle:NSTextFieldSquareBezel];
4378 } 4378 }
4379 [textfield setBackgroundColor:[NSColor clearColor]]; 4379 [textfield setBackgroundColor:[NSColor clearColor]];
4380 [textfield setDrawsBackground:NO]; 4380 [textfield setDrawsBackground:NO];
4381 [[textfield cell] setVCenter:YES];
4381 return textfield; 4382 return textfield;
4382 } 4383 }
4383 4384
4384 /* 4385 /*
4385 * Create a new static text window (widget) to be packed. 4386 * Create a new static text window (widget) to be packed.
6886 else if([object isKindOfClass:[NSTextField class]]) 6887 else if([object isKindOfClass:[NSTextField class]])
6887 { 6888 {
6888 NSTextField *tf = object; 6889 NSTextField *tf = object;
6889 6890
6890 [[tf cell] setAlignment:(style & 0xF)]; 6891 [[tf cell] setAlignment:(style & 0xF)];
6891 if(style & DW_DT_VCENTER) 6892 if(mask & DW_DT_VCENTER)
6892 { 6893 {
6893 [[tf cell] setVCenter:YES]; 6894 [[tf cell] setVCenter:(style & DW_DT_VCENTER ? YES : NO)];
6894 } 6895 }
6895 } 6896 }
6896 else if([object isMemberOfClass:[NSTextView class]]) 6897 else if([object isMemberOfClass:[NSTextView class]])
6897 { 6898 {
6898 NSTextView *tv = handle; 6899 NSTextView *tv = handle;