Commit a808d9f3 authored by Kevin Bailey's avatar Kevin Bailey Committed by Commit Bot

[omnibox] Improve dimensions and icon of tab switch button

This CL makes the dimensions within the tab switch button a closer
to the spec: 8px between icon and text, and reduces the 18px to the
left of the icon to 16px. (The spec still wants 8px here.)

Additionally, it updates the icon using the provided SVG.

Bug: 780835
Change-Id: I4542ea03c4097b83c959f77ed86c96b2744e14ce
Reviewed-on: https://chromium-review.googlesource.com/1101399Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Kevin Bailey <krb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567693}
parent c32a3d1e
......@@ -35,6 +35,7 @@ OmniboxTabSwitchButton::OmniboxTabSwitchButton(OmniboxPopupContentsView* model,
gfx::CreateVectorIcon(omnibox::kSwitchIcon,
GetLayoutConstant(LOCATION_BAR_ICON_SIZE),
SK_ColorBLACK));
SetHorizontalAlignment(gfx::ALIGN_LEFT);
if (!calculated_widths_) {
icon_only_width_ = MdTextButton::CalculatePreferredSize().width();
SetText(l10n_util::GetStringUTF16(IDS_OMNIBOX_TAB_SUGGEST_SHORT_HINT));
......@@ -48,6 +49,7 @@ OmniboxTabSwitchButton::OmniboxTabSwitchButton(OmniboxPopupContentsView* model,
set_corner_radius(CalculatePreferredSize().height() / 2.f);
animation_->SetSlideDuration(500);
SetElideBehavior(gfx::FADE_TAIL);
SetImageLabelSpacing(8);
SetInstallFocusRingOnFocus(true);
focus_ring()->SetHasFocusPredicate([](View* view) {
......
......@@ -3,16 +3,39 @@
// found in the LICENSE file.
CANVAS_DIMENSIONS, 32,
MOVE_TO, 4, 7,
LINE_TO, 26, 7,
LINE_TO, 26, 23,
LINE_TO, 4, 23,
LINE_TO, 4, 10,
LINE_TO, 5, 10,
LINE_TO, 5, 21,
LINE_TO, 25, 21,
LINE_TO, 25, 14,
LINE_TO, 16, 14,
LINE_TO, 16, 9,
LINE_TO, 4, 9,
MOVE_TO, 25.33f, 5.33f,
CUBIC_TO, 26.8f, 5.33f, 28, 6.53f, 28, 8,
R_V_LINE_TO, 16,
R_CUBIC_TO, 0, 1.47f, -1.2f, 2.67f, -2.67f, 2.67f,
H_LINE_TO, 6.67f,
ARC_TO, 2.68f, 2.68f, 0, 0, 1, 4, 24,
V_LINE_TO, 8,
R_CUBIC_TO, 0, -1.47f, 1.2f, -2.67f, 2.67f, -2.67f,
R_H_LINE_TO, 18.67f,
CLOSE,
R_MOVE_TO, 0, 18.67f,
V_LINE_TO, 13.33f,
R_H_LINE_TO, -8,
V_LINE_TO, 8,
H_LINE_TO, 6.67f,
R_V_LINE_TO, 16,
R_H_LINE_TO, 18.67f,
CLOSE
CANVAS_DIMENSIONS, 16,
R_MOVE_TO, 13.44f, 2,
R_CUBIC_TO, 0.86f, 0, 1.56f, 0.68f, 1.56f, 1.5f,
R_V_LINE_TO, 9,
R_CUBIC_TO, 0, 0.83f, -0.7f, 1.5f, -1.56f, 1.5f,
R_H_LINE_TO, -10.89f,
R_CUBIC_TO, -0.86f, 0, -1.56f, -0.67f, -1.56f, -1.5f,
R_V_LINE_TO, -9,
R_CUBIC_TO, 0, -0.82f, 0.7f, -1.5f, 1.56f, -1.5f,
CLOSE,
R_MOVE_TO, -0.44f, 10,
R_V_LINE_TO, -5,
R_H_LINE_TO, -4,
R_V_LINE_TO, -3,
R_H_LINE_TO, -6,
R_V_LINE_TO, 8,
CLOSE
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