зеркало из https://github.com/nextcloud/talk-ios.git
Use autoMenuWidth option in popover menu.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
6a08323d04
Коммит
bd2df429ea
|
@ -1 +1 @@
|
|||
Subproject commit 577a5946b819aaa2506ee1fd0e6e30335c2665f6
|
||||
Subproject commit 7ddb72391bab1df15c510f709915285cd3243ec2
|
|
@ -252,7 +252,7 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success);
|
|||
NSMutableArray *menuArray = [NSMutableArray new];
|
||||
NSMutableArray *actionsArray = [NSMutableArray new];
|
||||
for (TalkAccount *account in [TalkAccount allObjects]) {
|
||||
NSString *accountName = [NSString stringWithFormat:@"%@ (%@)", account.userDisplayName, [[NSURL URLWithString:account.server] host]];
|
||||
NSString *accountName = account.userDisplayName;
|
||||
UIImage *accountImage = [[NCAPIController sharedInstance] userProfileImageForAccount:account withSize:CGSizeMake(72, 72)];
|
||||
UIImageView *accessoryImageView = (account.active) ? [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkbox-checked"]] : nil;
|
||||
FTPopOverMenuModel *accountModel = [[FTPopOverMenuModel alloc] initWithTitle:accountName image:accountImage selected:NO accessoryView:accessoryImageView];
|
||||
|
@ -260,16 +260,16 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success);
|
|||
[actionsArray addObject:account];
|
||||
}
|
||||
FTPopOverMenuModel *addAccountModel = [[FTPopOverMenuModel alloc] initWithTitle:@"Add account" image:[UIImage imageNamed:@"add-settings"] selected:NO accessoryView:nil];
|
||||
FTPopOverMenuConfiguration *menuConfiguration = [[FTPopOverMenuConfiguration alloc] init];
|
||||
[menuArray addObject:addAccountModel];
|
||||
[actionsArray addObject:@"AddAccountAction"];
|
||||
|
||||
FTPopOverMenuConfiguration *menuConfiguration = [[FTPopOverMenuConfiguration alloc] init];
|
||||
menuConfiguration.menuIconMargin = 12;
|
||||
menuConfiguration.menuTextMargin = 12;
|
||||
menuConfiguration.imageSize = CGSizeMake(24, 24);
|
||||
menuConfiguration.separatorInset = UIEdgeInsetsMake(0, 48, 0, 0);
|
||||
menuConfiguration.menuRowHeight = 44;
|
||||
menuConfiguration.menuWidth = 250;
|
||||
menuConfiguration.autoMenuWidth = YES;
|
||||
menuConfiguration.textColor = [UIColor darkTextColor];
|
||||
menuConfiguration.textFont = [UIFont systemFontOfSize:15];
|
||||
menuConfiguration.backgroundColor = [UIColor whiteColor];
|
||||
|
|
Загрузка…
Ссылка в новой задаче