diff -r a59acc683080 -r ccc5ed68222d Source/GGBTextLayer.m --- a/Source/GGBTextLayer.m Thu May 29 15:04:06 2008 -0700 +++ b/Source/GGBTextLayer.m Mon Jul 14 21:46:09 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: