Commit 1f8ec211 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][Credential-Provider] Tooltip UX tweaks

Update Tooltip specs to the ones detailed in the attached bug.

Bug: 1090777
Change-Id: I4e76f3c2e168bc8e4ffd8bb1dc88fb343db817fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253899
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780269}
parent 85529208
...@@ -279,7 +279,7 @@ typedef NS_ENUM(NSInteger, RowIdentifier) { ...@@ -279,7 +279,7 @@ typedef NS_ENUM(NSInteger, RowIdentifier) {
TooltipView* tooltip = [[TooltipView alloc] initWithKeyWindow:self.view TooltipView* tooltip = [[TooltipView alloc] initWithKeyWindow:self.view
target:self target:self
action:action]; action:action];
[tooltip showMessage:message atBottomOf:cell.detailTextLabel]; [tooltip showMessage:message atBottomOf:cell];
} }
@end @end
...@@ -15,9 +15,9 @@ namespace { ...@@ -15,9 +15,9 @@ namespace {
CGFloat kTooltipTailHeight = 8; CGFloat kTooltipTailHeight = 8;
CGFloat kTooltipTailWidth = 16; CGFloat kTooltipTailWidth = 16;
CGFloat kTooltipHorizontalPadding = 10.0f; CGFloat kTooltipHorizontalPadding = 16.0f;
CGFloat kTooltipVerticalPadding = 4.0f; CGFloat kTooltipVerticalPadding = 10.0f;
CGFloat kTooltipCornerRadius = 3.0f; CGFloat kTooltipCornerRadius = 8.0f;
CGFloat kTooltipFadeInTime = 0.2f; CGFloat kTooltipFadeInTime = 0.2f;
} // namespace } // namespace
...@@ -59,7 +59,7 @@ static __weak TooltipView* _active; ...@@ -59,7 +59,7 @@ static __weak TooltipView* _active;
CGSize labelSize = [message sizeWithAttributes:@{ CGSize labelSize = [message sizeWithAttributes:@{
NSFontAttributeName : NSFontAttributeName :
[UIFont preferredFontForTextStyle:UIFontTextStyleCallout] [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]
}]; }];
UILabel* label = [[UILabel alloc] UILabel* label = [[UILabel alloc]
...@@ -68,7 +68,7 @@ static __weak TooltipView* _active; ...@@ -68,7 +68,7 @@ static __weak TooltipView* _active;
labelSize.width, labelSize.height)]; labelSize.width, labelSize.height)];
label.textAlignment = NSTextAlignmentLeft; label.textAlignment = NSTextAlignmentLeft;
label.text = message; label.text = message;
label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCallout]; label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline];
label.textColor = [UIColor colorNamed:kBackgroundColor]; label.textColor = [UIColor colorNamed:kBackgroundColor];
CGFloat width = labelSize.width + 2 * kTooltipHorizontalPadding; CGFloat width = labelSize.width + 2 * kTooltipHorizontalPadding;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment