Commit 15ceed94 authored by Charlene Yan's avatar Charlene Yan Committed by Commit Bot

[Tab Scrolling] Use real tab scrolling icons.

Bug: 1116118

Change-Id: I64a0743be4a37f72eeec24ad29ac3fa65948b22c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466208Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarTaylor Bergquist <tbergquist@chromium.org>
Commit-Queue: Charlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816757}
parent c8b21365
......@@ -93,6 +93,8 @@ aggregate_vector_icons2("chrome_vector_icons") {
"remove_box.icon",
"resize_handle.icon",
"sad_tab.icon",
"scrolling_tabstrip_left.icon",
"scrolling_tabstrip_right.icon",
"security.icon",
"send_tab_to_self.icon",
"sign_out.icon",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 16,
MOVE_TO, 7.03f, 8,
LINE_TO, 12, 3.4f,
LINE_TO, 10.49f, 2,
LINE_TO, 4, 8,
R_LINE_TO, 6.49f, 6,
LINE_TO, 12, 12.6f,
LINE_TO, 7.03f, 8,
CLOSE
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 16,
MOVE_TO, 8.97f, 8,
LINE_TO, 4, 3.4f,
LINE_TO, 5.51f, 2,
LINE_TO, 12, 8,
R_LINE_TO, -6.49f, 6,
LINE_TO, 4, 12.6f,
LINE_TO, 8.97f, 8,
CLOSE
......@@ -45,12 +45,6 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip) {
auto right_scroll =
std::make_unique<views::ImageButton>(base::BindRepeating(
&TabStripRegionView::ScrollRight, base::Unretained(this)));
const SkColor icon_color = GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_MenuIconColor);
views::SetImageFromVectorIconWithColor(left_scroll.get(), kBrowserToolsIcon,
icon_color);
views::SetImageFromVectorIconWithColor(right_scroll.get(),
kBrowserToolsIcon, icon_color);
left_scroll_ = AddChildView(std::move(left_scroll));
right_scroll_ = AddChildView(std::move(right_scroll));
} else {
......@@ -131,6 +125,16 @@ bool TabStripRegionView::IsPositionInWindowCaption(const gfx::Point& point) {
void TabStripRegionView::FrameColorsChanged() {
if (tab_search_button_)
tab_search_button_->FrameColorsChanged();
if (base::FeatureList::IsEnabled(features::kScrollableTabStrip)) {
const SkColor background_color = tab_strip_->GetTabBackgroundColor(
TabActive::kInactive, BrowserFrameActiveState::kUseCurrent);
SkColor foreground_color = tab_strip_->GetTabForegroundColor(
TabActive::kInactive, background_color);
views::SetImageFromVectorIconWithColor(
left_scroll_, kScrollingTabstripLeftIcon, foreground_color);
views::SetImageFromVectorIconWithColor(
right_scroll_, kScrollingTabstripRightIcon, foreground_color);
}
tab_strip_->FrameColorsChanged();
SchedulePaint();
}
......
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