Commit 2370cef0 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Updates BookmarkEditorVCs Toolbar UI

- Makes some small changes in order to make BookmarkEditVC and BookmarkFolderEditorVC navigation
toolbars appeareance more similar to the ElevatedToolbar they were using before.

Screenshots:
Old: https://drive.google.com/open?id=1uagROckekOJXPjwxu6HdhGfXUEoZtZ7v
New: https://drive.google.com/open?id=1btpW_JxZ-Kad0U0fgPtGuYrD03FceXQq

Bug: 839435
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ifbfc7ca44dad96bad6d6fc55788ecb1c670580a3
Reviewed-on: https://chromium-review.googlesource.com/1053390
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557595}
parent 2ab4a7c3
......@@ -39,6 +39,7 @@
#import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h"
#import "ios/third_party/material_components_ios/src/components/ShadowElevations/src/MaterialShadowElevations.h"
#import "ios/third_party/material_components_ios/src/components/ShadowLayer/src/MaterialShadowLayer.h"
#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h"
#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
......@@ -225,14 +226,24 @@ typedef NS_ENUM(NSInteger, ItemType) {
self.doneItem = doneItem;
// Setup the bottom toolbar.
self.navigationController.toolbar.barTintColor = [UIColor whiteColor];
NSString* titleString = l10n_util::GetNSString(IDS_IOS_BOOKMARK_DELETE);
titleString = [titleString uppercaseString];
UIBarButtonItem* deleteButton =
[[UIBarButtonItem alloc] initWithTitle:titleString
style:UIBarButtonItemStylePlain
target:self
action:@selector(deleteBookmark)];
deleteButton.accessibilityIdentifier = kBookmarkEditDeleteButtonIdentifier;
deleteButton.tintColor = [UIColor blackColor];
[deleteButton
setTitleTextAttributes:[NSDictionary
dictionaryWithObjectsAndKeys:
[[MDCTypography fontLoader]
mediumFontOfSize:14],
NSFontAttributeName, [UIColor blackColor],
NSForegroundColorAttributeName, nil]
forState:UIControlStateNormal];
UIBarButtonItem* spaceButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil
......
......@@ -451,7 +451,9 @@ folderEditorWithBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel
- (void)addToolbar {
self.navigationController.toolbarHidden = NO;
self.navigationController.toolbar.barTintColor = [UIColor whiteColor];
NSString* titleString = l10n_util::GetNSString(IDS_IOS_BOOKMARK_GROUP_DELETE);
titleString = [titleString uppercaseString];
UIBarButtonItem* deleteButton =
[[UIBarButtonItem alloc] initWithTitle:titleString
style:UIBarButtonItemStylePlain
......@@ -459,7 +461,14 @@ folderEditorWithBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel
action:@selector(deleteFolder)];
deleteButton.accessibilityIdentifier =
kBookmarkFolderEditorDeleteButtonIdentifier;
deleteButton.tintColor = [UIColor blackColor];
[deleteButton
setTitleTextAttributes:[NSDictionary
dictionaryWithObjectsAndKeys:
[[MDCTypography fontLoader]
mediumFontOfSize:14],
NSFontAttributeName, [UIColor blackColor],
NSForegroundColorAttributeName, nil]
forState:UIControlStateNormal];
UIBarButtonItem* spaceButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
......
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