#1740 (avatar and notification icons)

- Tweaked positions of avatar and notifcations buttons again.
This commit is contained in:
David Sinclair 2022-10-26 13:20:36 -06:00
parent 0331844d56
commit 9605dcb552

View file

@ -683,13 +683,14 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
activityButton.accessibilityLabel = @"Activities"; activityButton.accessibilityLabel = @"Activities";
[activityButton setImage:activityImage forState:UIControlStateNormal]; [activityButton setImage:activityImage forState:UIControlStateNormal];
activityButton.tintColor = UIColorFromRGB(0x8F918B); activityButton.tintColor = UIColorFromRGB(0x8F918B);
[activityButton setImageEdgeInsets:UIEdgeInsetsMake(4, 12, 4, -12)]; [activityButton setImageEdgeInsets:UIEdgeInsetsMake(4, 0, 4, 0)];
[activityButton addTarget:self [activityButton addTarget:self
action:@selector(showInteractionsPopover:) action:@selector(showInteractionsPopover:)
forControlEvents:UIControlEventTouchUpInside]; forControlEvents:UIControlEventTouchUpInside];
activitiesButton = [[UIBarButtonItem alloc] activitiesButton = [[UIBarButtonItem alloc]
initWithCustomView:activityButton]; initWithCustomView:activityButton];
activitiesButton.width = 32; activitiesButton.width = 32;
// activityButton.backgroundColor = UIColor.redColor;
self.navigationItem.rightBarButtonItem = activitiesButton; self.navigationItem.rightBarButtonItem = activitiesButton;
NSMutableDictionary *sortedFolders = [[NSMutableDictionary alloc] init]; NSMutableDictionary *sortedFolders = [[NSMutableDictionary alloc] init];
@ -2765,7 +2766,7 @@ heightForHeaderInSection:(NSInteger)section {
userAvatarButton.pointerInteractionEnabled = YES; userAvatarButton.pointerInteractionEnabled = YES;
userAvatarButton.accessibilityLabel = @"User info"; userAvatarButton.accessibilityLabel = @"User info";
userAvatarButton.accessibilityHint = @"Double-tap for information about your account."; userAvatarButton.accessibilityHint = @"Double-tap for information about your account.";
UIEdgeInsets insets = UIEdgeInsetsMake(0, 0, 10, 0); UIEdgeInsets insets = UIEdgeInsetsMake(0, -10, 10, 0);
userAvatarButton.contentEdgeInsets = insets; userAvatarButton.contentEdgeInsets = insets;
NSMutableURLRequest *avatarRequest = [NSMutableURLRequest requestWithURL:imageURL]; NSMutableURLRequest *avatarRequest = [NSMutableURLRequest requestWithURL:imageURL];
@ -2785,7 +2786,7 @@ heightForHeaderInSection:(NSInteger)section {
[userInfoView addSubview:userAvatarButton]; [userInfoView addSubview:userAvatarButton];
userLabel = [[UILabel alloc] initWithFrame:CGRectMake(54, yOffset, userInfoView.frame.size.width, 16)]; userLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, yOffset, userInfoView.frame.size.width, 16)];
userLabel.text = appDelegate.activeUsername; userLabel.text = appDelegate.activeUsername;
userLabel.font = userLabelFont; userLabel.font = userLabelFont;
userLabel.textColor = UIColorFromRGB(0x404040); userLabel.textColor = UIColorFromRGB(0x404040);
@ -2817,6 +2818,8 @@ heightForHeaderInSection:(NSInteger)section {
[userInfoView sizeToFit]; [userInfoView sizeToFit];
// userInfoView.backgroundColor = UIColor.blueColor;
self.navigationItem.titleView = userInfoView; self.navigationItem.titleView = userInfoView;
} }