From f05429b5945a0d6062a9f14a682a672f1603803e Mon Sep 17 00:00:00 2001 From: Ronny Date: Fri, 22 Apr 2016 21:34:09 +0200 Subject: [PATCH] Prevent skewed group image (fixes #756) (#1159) * Prevent skewed group image (#756) - fixes #756 //FREEBIE * Prevent skewed group image in inbox view (#756) - fix skewed inbox view image - fixes #756 //FREEBIE --- Signal/src/view controllers/InboxTableViewCell.m | 1 + Signal/src/view controllers/NewGroupViewController.m | 1 + 2 files changed, 2 insertions(+) diff --git a/Signal/src/view controllers/InboxTableViewCell.m b/Signal/src/view controllers/InboxTableViewCell.m index 3920710de..8ae46ed1d 100644 --- a/Signal/src/view controllers/InboxTableViewCell.m +++ b/Signal/src/view controllers/InboxTableViewCell.m @@ -65,6 +65,7 @@ _timeLabel.attributedText = attributedDate; if ([thread isKindOfClass:[TSGroupThread class]]) { + _contactPictureView.contentMode = UIViewContentModeScaleAspectFill; _contactPictureView.image = ((TSGroupThread *)thread).groupModel.groupImage != nil ? ((TSGroupThread *)thread).groupModel.groupImage : [UIImage imageNamed:@"empty-group-avatar"]; diff --git a/Signal/src/view controllers/NewGroupViewController.m b/Signal/src/view controllers/NewGroupViewController.m index 9e69f4cb1..62e10aeda 100644 --- a/Signal/src/view controllers/NewGroupViewController.m +++ b/Signal/src/view controllers/NewGroupViewController.m @@ -318,6 +318,7 @@ static NSString *const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue" _groupImageButton.imageView.layer.masksToBounds = YES; _groupImageButton.imageView.layer.borderColor = [[UIColor lightGrayColor] CGColor]; _groupImageButton.imageView.layer.borderWidth = 0.5f; + _groupImageButton.imageView.contentMode = UIViewContentModeScaleAspectFill; } #pragma mark - Table view data source