1.1 --- a/Source/GGBTextLayer.m Thu May 29 15:04:06 2008 -0700
1.2 +++ b/Source/GGBTextLayer.m Fri Jul 18 13:26:59 2008 -0700
1.3 @@ -51,13 +51,17 @@
1.4 label.foregroundColor = kBlackColor;
1.5
1.6 NSString *mode;
1.7 - if( align & kCALayerWidthSizable )
1.8 + if( (align & (kCALayerMinXMargin | kCALayerMaxXMargin)) == (kCALayerMinXMargin | kCALayerMaxXMargin) )
1.9 mode = @"center";
1.10 - else if( align & kCALayerMinXMargin )
1.11 - mode = @"right";
1.12 - else
1.13 - mode = @"left";
1.14 - align |= kCALayerWidthSizable;
1.15 + else {
1.16 + if( align & kCALayerWidthSizable )
1.17 + mode = @"center";
1.18 + else if( align & kCALayerMinXMargin )
1.19 + mode = @"right";
1.20 + else
1.21 + mode = @"left";
1.22 + align |= kCALayerWidthSizable;
1.23 + }
1.24 label.alignmentMode = mode;
1.25
1.26 // Get the bounds of the interior of the superlayer: