Skip to content

Commit

Permalink
make chat view selectable
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Mercadal committed Jun 14, 2011
1 parent 3ea749c commit 1d2ff32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TNMessageView.j
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,20 @@ TNMessageViewBubbleColorNotice = 3;
[_fieldAuthor setFont:[CPFont boldSystemFontOfSize:12]];
[_fieldAuthor setTextColor:[CPColor grayColor]];
[_fieldAuthor setAutoresizingMask:CPViewWidthSizable];
[_fieldAuthor setSelectable:YES];

_fieldMessage = [[CPTextField alloc] initWithFrame:CGRectMake(20, 30, CGRectGetWidth([_viewContainer frame]) - 40 , CGRectGetHeight([_viewContainer frame]))];
[_fieldMessage setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
[_fieldMessage setLineBreakMode:CPLineBreakByWordWrapping];
[_fieldMessage setSelectable:YES];

_fieldTimestamp = [[CPTextField alloc] initWithFrame:CGRectMake(CGRectGetWidth([_viewContainer frame]) - 210, 10, 190, 20)];
[_fieldTimestamp setAutoresizingMask:CPViewMinXMargin];
[_fieldTimestamp setValue:[CPColor colorWithHexString:@"f2f0e4"] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_fieldTimestamp setValue:[CPFont systemFontOfSize:9.0] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_fieldTimestamp setValue:[CPColor colorWithHexString:@"808080"] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_fieldTimestamp setAlignment:CPRightTextAlignment];
[_fieldTimestamp setSelectable:YES];

[_viewContainer addSubview:_fieldAuthor];
[_viewContainer addSubview:_fieldMessage];
Expand Down

0 comments on commit 1d2ff32

Please sign in to comment.