Commit 2b7db899 authored by edchin's avatar edchin Committed by Commit Bot

[ios] Add tab grid toolbar button assets

This CL also renames some other assets for naming consistency.

Bug: 818198
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I1b603f16740e5ac5279533ea39db6f9d3ab1088a
Reviewed-on: https://chromium-review.googlesource.com/962832Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543265}
parent 0d86ccd6
...@@ -67,9 +67,11 @@ source_set("tab_grid_ui") { ...@@ -67,9 +67,11 @@ source_set("tab_grid_ui") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
deps = [ deps = [
"resources:grid_close_cell", "resources:grid_cell_close_button",
"resources:new_tab_floating_button", "resources:new_tab_floating_button",
"resources:new_tab_floating_button_incognito", "resources:new_tab_floating_button_incognito",
"resources:new_tab_toolbar_button",
"resources:new_tab_toolbar_button_incognito",
"//base", "//base",
"//ios/chrome/app/strings", "//ios/chrome/app/strings",
"//ios/chrome/browser", "//ios/chrome/browser",
......
...@@ -202,7 +202,7 @@ const CGFloat kBorderWidth = 6.0f; ...@@ -202,7 +202,7 @@ const CGFloat kBorderWidth = 6.0f;
UIButton* closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton* closeButton = [UIButton buttonWithType:UIButtonTypeCustom];
closeButton.translatesAutoresizingMaskIntoConstraints = NO; closeButton.translatesAutoresizingMaskIntoConstraints = NO;
UIImage* closeImage = [[UIImage imageNamed:@"grid_close_cell"] UIImage* closeImage = [[UIImage imageNamed:@"grid_cell_close_button"]
imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
[closeButton setImage:closeImage forState:UIControlStateNormal]; [closeButton setImage:closeImage forState:UIControlStateNormal];
[closeButton addTarget:self [closeButton addTarget:self
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
import("//build/config/ios/asset_catalog.gni") import("//build/config/ios/asset_catalog.gni")
imageset("grid_close_cell") { imageset("grid_cell_close_button") {
sources = [ sources = [
"grid_close_cell.imageset/Contents.json", "grid_cell_close_button.imageset/Contents.json",
"grid_close_cell.imageset/grid_close_cell.png", "grid_cell_close_button.imageset/grid_cell_close_button.png",
"grid_close_cell.imageset/grid_close_cell@2x.png", "grid_cell_close_button.imageset/grid_cell_close_button@2x.png",
"grid_close_cell.imageset/grid_close_cell@3x.png", "grid_cell_close_button.imageset/grid_cell_close_button@3x.png",
] ]
} }
...@@ -30,3 +30,21 @@ imageset("new_tab_floating_button_incognito") { ...@@ -30,3 +30,21 @@ imageset("new_tab_floating_button_incognito") {
"new_tab_floating_button_incognito.imageset/new_tab_floating_button_incognito@3x.png", "new_tab_floating_button_incognito.imageset/new_tab_floating_button_incognito@3x.png",
] ]
} }
imageset("new_tab_toolbar_button") {
sources = [
"new_tab_toolbar_button.imageset/Contents.json",
"new_tab_toolbar_button.imageset/new_tab_toolbar_button.png",
"new_tab_toolbar_button.imageset/new_tab_toolbar_button@2x.png",
"new_tab_toolbar_button.imageset/new_tab_toolbar_button@3x.png",
]
}
imageset("new_tab_toolbar_button_incognito") {
sources = [
"new_tab_toolbar_button_incognito.imageset/Contents.json",
"new_tab_toolbar_button_incognito.imageset/new_tab_toolbar_button_incognito.png",
"new_tab_toolbar_button_incognito.imageset/new_tab_toolbar_button_incognito@2x.png",
"new_tab_toolbar_button_incognito.imageset/new_tab_toolbar_button_incognito@3x.png",
]
}
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
{ {
"idiom": "universal", "idiom": "universal",
"scale": "1x", "scale": "1x",
"filename": "grid_close_cell.png" "filename": "grid_cell_close_button.png"
}, },
{ {
"idiom": "universal", "idiom": "universal",
"scale": "2x", "scale": "2x",
"filename": "grid_close_cell@2x.png" "filename": "grid_cell_close_button@2x.png"
}, },
{ {
"idiom": "universal", "idiom": "universal",
"scale": "3x", "scale": "3x",
"filename": "grid_close_cell@3x.png" "filename": "grid_cell_close_button@3x.png"
} }
], ],
"info": { "info": {
......
{
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "new_tab_toolbar_button.png"
},
{
"idiom": "universal",
"scale": "2x",
"filename": "new_tab_toolbar_button@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "new_tab_toolbar_button@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
{
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "new_tab_toolbar_button_incognito.png"
},
{
"idiom": "universal",
"scale": "2x",
"filename": "new_tab_toolbar_button_incognito@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "new_tab_toolbar_button_incognito@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
...@@ -551,12 +551,9 @@ typedef NS_ENUM(NSUInteger, TabGridConfiguration) { ...@@ -551,12 +551,9 @@ typedef NS_ENUM(NSUInteger, TabGridConfiguration) {
} }
switch (self.configuration) { switch (self.configuration) {
case TabGridConfigurationBottomToolbar: case TabGridConfigurationBottomToolbar:
// TODO(crbug.com/818198) : Add toolbar new tab assets and modify names [self updateNewTabButtonWithIncognitoImageName:
// passed below. @"new_tab_toolbar_button_incognito"
[self regularImageName:@"new_tab_toolbar_button"];
updateNewTabButtonWithIncognitoImageName:
@"new_tab_floating_button_incognito"
regularImageName:@"new_tab_floating_button"];
break; break;
case TabGridConfigurationFloatingButton: case TabGridConfigurationFloatingButton:
[self [self
......
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