Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5932)

Unified Diff: chrome/browser/ui/views/location_bar/bubble_icon_view.cc

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Removed the mask Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/bubble_icon_view.cc
diff --git a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
index 2c95325f35c6e6c3de3802207742bdbb3e4f1f52..4492d4c74a7a712144e412a363f3fc388e54e811 100644
--- a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
@@ -13,6 +13,7 @@
#include "ui/gfx/color_utils.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/native_theme/native_theme.h"
+#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
#include "ui/views/animation/ink_drop_highlight.h"
#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/bubble/bubble_dialog_delegate.h"
@@ -152,7 +153,8 @@ void BubbleIconView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
}
std::unique_ptr<views::InkDrop> BubbleIconView::CreateInkDrop() {
- std::unique_ptr<views::InkDropImpl> ink_drop = CreateDefaultInkDropImpl();
+ std::unique_ptr<views::InkDropImpl> ink_drop =
+ CreateDefaultFloodFillInkDropImpl();
ink_drop->SetShowHighlightOnFocus(true);
return std::move(ink_drop);
}
@@ -162,6 +164,14 @@ SkColor BubbleIconView::GetInkDropBaseColor() const {
ui::NativeTheme::kColorId_TextfieldDefaultColor));
}
+std::unique_ptr<views::InkDropRipple> BubbleIconView::CreateInkDropRipple()
+ const {
+ return base::MakeUnique<views::FloodFillInkDropRipple>(
+ gfx::Size(kDefaultInkDropSize, kDefaultInkDropSize),
+ GetLocalBounds().CenterPoint(), GetInkDropBaseColor(),
bruthig 2017/04/21 15:05:09 Was it an intentional decision to center the rippl
spqchan 2017/04/27 21:40:06 Nope, this method slipped past my radar
+ ink_drop_visible_opacity());
+}
+
void BubbleIconView::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_TAP) {
AnimateInkDrop(views::InkDropState::ACTIVATED, event);

Powered by Google App Engine
This is Rietveld 408576698