changeset 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
files mac/dw.m
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Mon Apr 25 12:26:20 2011 +0000
+++ b/mac/dw.m	Mon Apr 25 16:08:23 2011 +0000
@@ -4378,6 +4378,7 @@
     }
     [textfield setBackgroundColor:[NSColor clearColor]];
     [textfield setDrawsBackground:NO];
+    [[textfield cell] setVCenter:YES];
     return textfield;
 }
 
@@ -6888,9 +6889,9 @@
         NSTextField *tf = object;
 
         [[tf cell] setAlignment:(style & 0xF)];
-        if(style & DW_DT_VCENTER)
-        {
-            [[tf cell] setVCenter:YES];
+        if(mask & DW_DT_VCENTER)
+        {
+            [[tf cell] setVCenter:(style & DW_DT_VCENTER ? YES : NO)];
         }
     }
     else if([object isMemberOfClass:[NSTextView class]])