Auto resize address text to fit label's width

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2012-03-27 14:19:42 +02:00
parent b38d2f89cf
commit 501466bcfb

View file

@ -404,8 +404,8 @@ void addAnimationFadeTransition(UIView* view, float duration) {
pause.imageView.contentMode = UIViewContentModeCenter;
contacts.imageView.contentMode = UIViewContentModeCenter;
addCall.imageView.contentMode = UIViewContentModeCenter;
dialer.imageView.contentMode = UIViewContentModeCenter;
*/
dialer.imageView.contentMode = UIViewContentModeCenter;*/
}
-(void) addCallPressed {
@ -585,6 +585,7 @@ void addAnimationFadeTransition(UIView* view, float duration) {
[self enableVideoDisplay];
[self updateUIFromLinphoneState: YES];
videoWaitingForFirstImage.hidden = NO;
[videoWaitingForFirstImage startAnimating];
return;
if (mIncallViewIsReady) {
@ -747,6 +748,8 @@ void addAnimationFadeTransition(UIView* view, float duration) {
}
const LinphoneAddress* addr = linphone_call_get_remote_address(call);
label.adjustsFontSizeToFitWidth = YES;
if (addr) {
const char* lUserNameChars=linphone_address_get_username(addr);
NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil);