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

Unified Diff: chrome/browser/ui/views/intent_picker_bubble_view.cc

Issue 2779113002: Use ink drop highlight for focus on arc intent picker buttons.
Patch Set: fix Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/intent_picker_bubble_view.cc
diff --git a/chrome/browser/ui/views/intent_picker_bubble_view.cc b/chrome/browser/ui/views/intent_picker_bubble_view.cc
index 9632fbf6327da47678aaf2cedd7f037f5c05542f..22f1034fbea5cafdcb8747a84d80c9ec16724224 100644
--- a/chrome/browser/ui/views/intent_picker_bubble_view.cc
+++ b/chrome/browser/ui/views/intent_picker_bubble_view.cc
@@ -18,12 +18,14 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/canvas.h"
#include "ui/views/animation/ink_drop_host_view.h"
+#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/grid_layout.h"
+#include "ui/views/painter.h"
#include "ui/views/window/dialog_client_view.h"
namespace {
@@ -63,6 +65,7 @@ class IntentPickerLabelButton : public views::LabelButton {
SetHorizontalAlignment(gfx::ALIGN_LEFT);
SetMinSize(gfx::Size(kMaxWidth, kRowHeight));
SetInkDropMode(InkDropMode::ON);
+ SetFocusPainter(nullptr);
if (!icon->IsEmpty())
SetImage(views::ImageButton::STATE_NORMAL, *icon->ToImageSkia());
SetBorder(views::CreateEmptyBorder(10, 16, 10, 0));
@@ -84,6 +87,14 @@ class IntentPickerLabelButton : public views::LabelButton {
return GetInkDrop()->GetTargetInkDropState();
}
+ // LabelButton:
+ std::unique_ptr<views::InkDrop> CreateInkDrop() override {
+ std::unique_ptr<views::InkDropImpl> ink_drop =
+ CreateDefaultFloodFillInkDropImpl();
+ ink_drop->SetShowHighlightOnFocus(true);
+ return std::move(ink_drop);
+ }
+
private:
std::string package_name_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698