Commit c9b9470f authored by Tommy C. Li's avatar Tommy C. Li Committed by Commit Bot

Omnibox UI Refresh: Update background color to white when popup open

Previously, it was only white in the touchable modes, but it should be
white when the popup is open in all the newer Material modes.

Bug: 837500, 823535
Change-Id: Ifd52903798553f50645148a9d44c6a80ee0eb479
Reviewed-on: https://chromium-review.googlesource.com/1062504
Commit-Queue: Tommy Li <tommycli@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559310}
parent 92ef443d
...@@ -120,10 +120,6 @@ using views::View; ...@@ -120,10 +120,6 @@ using views::View;
namespace { namespace {
bool InTouchableMode() {
return ui::MaterialDesignController::IsTouchOptimizedUiEnabled();
}
// Returns true when a views::FocusRing should be used. // Returns true when a views::FocusRing should be used.
bool ShouldUseFocusRingView(bool show_focus_ring) { bool ShouldUseFocusRingView(bool show_focus_ring) {
return (show_focus_ring && LocationBarView::IsRounded()) || return (show_focus_ring && LocationBarView::IsRounded()) ||
...@@ -815,7 +811,7 @@ void LocationBarView::RefreshBackground() { ...@@ -815,7 +811,7 @@ void LocationBarView::RefreshBackground() {
SkColor background_color = GetColor(OmniboxPart::LOCATION_BAR_BACKGROUND); SkColor background_color = GetColor(OmniboxPart::LOCATION_BAR_BACKGROUND);
SkColor border_color = GetBorderColor(); SkColor border_color = GetBorderColor();
if (InTouchableMode()) { if (IsRounded()) {
// When the omnibox dropdown is open, match its color and remove the focus // When the omnibox dropdown is open, match its color and remove the focus
// ring. // ring.
if (GetOmniboxPopupView()->IsOpen()) { if (GetOmniboxPopupView()->IsOpen()) {
...@@ -939,7 +935,9 @@ bool LocationBarView::RefreshFindBarIcon() { ...@@ -939,7 +935,9 @@ bool LocationBarView::RefreshFindBarIcon() {
void LocationBarView::RefreshClearAllButtonIcon() { void LocationBarView::RefreshClearAllButtonIcon() {
const gfx::VectorIcon& icon = const gfx::VectorIcon& icon =
InTouchableMode() ? omnibox::kTouchableClearIcon : kTabCloseNormalIcon; ui::MaterialDesignController::IsTouchOptimizedUiEnabled()
? omnibox::kTouchableClearIcon
: kTabCloseNormalIcon;
SetImageFromVectorIcon(clear_all_button_, icon, SetImageFromVectorIcon(clear_all_button_, icon,
GetColor(OmniboxPart::LOCATION_BAR_CLEAR_ALL)); GetColor(OmniboxPart::LOCATION_BAR_CLEAR_ALL));
clear_all_button_->SetBorder(views::CreateEmptyBorder( clear_all_button_->SetBorder(views::CreateEmptyBorder(
......
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