Skip to content

Commit

Permalink
don't set the title shadow color to nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed May 18, 2012
1 parent 9a7ba10 commit 942c021
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/UIKit/TUIButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ - (void)drawRect:(CGRect)r

_titleView.text = self.currentTitle;
_titleView.textColor = self.currentTitleColor;
_titleView.renderer.shadowColor = self.currentTitleShadowColor;
TUIColor *shadowColor = self.currentTitleShadowColor;
// they may have manually set the renderer's shadow color, in which case we
// don't want to reset it to nothing
if(shadowColor != nil) {
_titleView.renderer.shadowColor = shadowColor;
}

CGContextRef ctx = TUIGraphicsGetCurrentContext();
CGContextSaveGState(ctx);
Expand Down

0 comments on commit 942c021

Please sign in to comment.