mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Set maximum contact name on chat conversation list
This commit is contained in:
parent
9ebc8e70b7
commit
15db9f3749
1 changed files with 5 additions and 1 deletions
|
|
@ -142,9 +142,13 @@
|
|||
CGSize chatContentSize = [[chatContentLabel text] sizeWithFont:[chatContentLabel font]];
|
||||
float sum = displayNameSize.width + 5 + chatContentSize.width;
|
||||
float limit = self.bounds.size.width - 5 - displayNameFrame.origin.x;
|
||||
if(sum >limit) {
|
||||
if(sum > limit) {
|
||||
displayNameSize.width *= limit/sum;
|
||||
chatContentSize.width *= limit/sum;
|
||||
if(displayNameSize.width > limit/2) {
|
||||
displayNameSize.width = limit/2;
|
||||
chatContentSize.width = limit/2;
|
||||
}
|
||||
}
|
||||
|
||||
displayNameFrame.size.width = displayNameSize.width;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue