used content inset in stead of frame offset to properly place the table header text

This commit is contained in:
Klaas Pieter Annema authored and Randall Luecke committed 2010-05-25 14:02:41 -05:00
1 parent 004829ac9e
commit d06d69966b
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -42,10 +42,13 @@
- (void)_init
{
_textField = [[_CPImageAndTextView alloc] initWithFrame:CGRectMake(5, 1, CGRectGetWidth([self bounds]) - 10, CGRectGetHeight([self bounds]) - 1)];
_textField = [[_CPImageAndTextView alloc] initWithFrame:
CGRectMake(0.0, 0.0, CGRectGetWidth([self bounds]), CGRectGetHeight([self bounds]))];
[_textField setAutoresizingMask:CPViewWidthSizable|CPViewHeightSizable];
[_textField setLineBreakMode:CPLineBreakByTruncatingTail];
[_textField setContentInset:CGInsetMake(0.0, 0.0, 0.0, 5.0)];
[_textField setTextColor:[CPColor colorWithRed:51.0 / 255.0 green:51.0 / 255.0 blue:51.0 / 255.0 alpha:1.0]];
[_textField setFont:[CPFont boldSystemFontOfSize:12.0]];
[_textField setAlignment:CPLeftTextAlignment];