diff -r a59acc683080 -r db7bb080c3d5 Source/GGBTextLayer.m --- a/Source/GGBTextLayer.m Thu May 29 15:04:06 2008 -0700 +++ b/Source/GGBTextLayer.m Tue Jul 08 13:12:01 2008 -0700 @@ -51,13 +51,17 @@ label.foregroundColor = kBlackColor; NSString *mode; - if( align & kCALayerWidthSizable ) + if( (align & (kCALayerMinXMargin | kCALayerMaxXMargin)) == (kCALayerMinXMargin | kCALayerMaxXMargin) ) mode = @"center"; - else if( align & kCALayerMinXMargin ) - mode = @"right"; - else - mode = @"left"; - align |= kCALayerWidthSizable; + else { + if( align & kCALayerWidthSizable ) + mode = @"center"; + else if( align & kCALayerMinXMargin ) + mode = @"right"; + else + mode = @"left"; + align |= kCALayerWidthSizable; + } label.alignmentMode = mode; // Get the bounds of the interior of the superlayer: