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

Unified Diff: ui/views/controls/button/label_button.cc

Issue 2001843002: Use ink drop hover for focus states on toolbar buttons and location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout Created 4 years, 7 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: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 98b6e0da97ae3cf50d71cd6bc5171dda22d40447..8c13cf00079a77fd6f6a80664e590b9e06a842af 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -12,6 +12,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "build/build_config.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/gfx/animation/throb_animation.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
@@ -107,8 +108,10 @@ LabelButton::LabelButton(ButtonListener* listener, const base::string16& text)
label_->SetHorizontalAlignment(gfx::ALIGN_TO_HEAD);
// Inset the button focus rect from the actual border; roughly match Windows.
- SetFocusPainter(Painter::CreateDashedFocusPainterWithInsets(gfx::Insets(
- kFocusRectInset, kFocusRectInset, kFocusRectInset, kFocusRectInset)));
+ if (!ui::MaterialDesignController::IsModeMaterial()) {
+ SetFocusPainter(Painter::CreateDashedFocusPainterWithInsets(gfx::Insets(
+ kFocusRectInset, kFocusRectInset, kFocusRectInset, kFocusRectInset)));
+ }
}
LabelButton::~LabelButton() {}
« no previous file with comments | « ui/views/controls/button/custom_button_unittest.cc ('k') | ui/views/controls/button/label_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698