Commit 3ee6269d authored by Orin Jaworski's avatar Orin Jaworski Committed by Commit Bot

Change new tab button ink drop opacity

New tab button ink drop effect is made less opaque for touch
and more opaque for non-touch interfaces.

Bug: 851041
Change-Id: I2243a44f3d98899eace803a0681e1b060014e08e
Reviewed-on: https://chromium-review.googlesource.com/1109459
Commit-Queue: Orin Jaworski <orinj@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569680}
parent a5f0e949
...@@ -100,7 +100,7 @@ NewTabButton::NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener) ...@@ -100,7 +100,7 @@ NewTabButton::NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener)
ink_drop_container_->SetVisible(false); ink_drop_container_->SetVisible(false);
SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER); SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER);
set_ink_drop_visible_opacity(0.14f); set_ink_drop_visible_opacity(0.08f);
SetFocusPainter(nullptr); SetFocusPainter(nullptr);
focus_ring_ = views::FocusRing::Install(this); focus_ring_ = views::FocusRing::Install(this);
...@@ -220,8 +220,10 @@ std::unique_ptr<views::InkDropRipple> NewTabButton::CreateInkDropRipple() ...@@ -220,8 +220,10 @@ std::unique_ptr<views::InkDropRipple> NewTabButton::CreateInkDropRipple()
std::unique_ptr<views::InkDropHighlight> NewTabButton::CreateInkDropHighlight() std::unique_ptr<views::InkDropHighlight> NewTabButton::CreateInkDropHighlight()
const { const {
const gfx::Rect bounds = GetContentsBounds(); const gfx::Rect bounds = GetContentsBounds();
return CreateDefaultInkDropHighlight( auto highlight = CreateDefaultInkDropHighlight(
gfx::RectF(GetMirroredRect(bounds)).CenterPoint(), bounds.size()); gfx::RectF(GetMirroredRect(bounds)).CenterPoint(), bounds.size());
highlight->set_visible_opacity(0.1f);
return highlight;
} }
void NewTabButton::NotifyClick(const ui::Event& event) { void NewTabButton::NotifyClick(const ui::Event& event) {
......
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