Permalink
Browse files

positioning fix for too small link buttons with minimum hit size

  • Loading branch information...
1 parent ef9db49 commit 44d71793333d30ab628fbf56963f8bff6bbd3782 @odrobnik odrobnik committed Aug 29, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Core/Source/DTLinkButton.m
@@ -171,7 +171,7 @@ - (void)drawTextInContext:(CGContextRef)context highlighted:(BOOL)highlighted
CGContextSetGrayStrokeColor(context, 0, 1.0);
}
- CGRect runStrokeBounds = self.bounds;
+ CGRect runStrokeBounds = UIEdgeInsetsInsetRect(self.bounds, self.contentEdgeInsets);
NSInteger superscriptStyle = [[glyphRunToDraw.attributes objectForKey:(id)kCTSuperscriptAttributeName] integerValue];
@@ -227,7 +227,7 @@ - (void)drawTextInContext:(CGContextRef)context highlighted:(BOOL)highlighted
// Flip the coordinate system
CGContextSetTextMatrix(context, CGAffineTransformIdentity);
CGContextScaleCTM(context, 1.0, -1.0);
- CGContextTranslateCTM(context, 0, -self.bounds.size.height+ceilf(glyphRunToDraw.descent));
+ CGContextTranslateCTM(context, 0, -self.bounds.size.height+ceilf(glyphRunToDraw.descent+self.contentEdgeInsets.bottom));
[glyphRunToDraw drawInContext:context];

0 comments on commit 44d7179

Please sign in to comment.