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

Unified Diff: ui/message_center/views/padded_button.cc

Issue 78803002: Fixing focus highlight on high DPI devices for accessibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years, 1 month 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 | « ui/message_center/views/padded_button.h ('k') | ui/views/controls/slider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/padded_button.cc
diff --git a/ui/message_center/views/padded_button.cc b/ui/message_center/views/padded_button.cc
index 950e133aca2fdfb9977050647e09b03c11716cf1..51e11c5343de886d581d3cfeb21637336f9e8d3e 100644
--- a/ui/message_center/views/padded_button.cc
+++ b/ui/message_center/views/padded_button.cc
@@ -16,6 +16,9 @@ PaddedButton::PaddedButton(views::ButtonListener* listener)
: views::ImageButton(listener) {
set_focusable(true);
set_request_focus_on_press(false);
+ set_focus_border(views::FocusBorder::CreateSolidFocusBorder(
+ kFocusBorderColor,
+ gfx::Insets(1, 2, 2, 2)));
}
PaddedButton::~PaddedButton() {
@@ -73,13 +76,6 @@ void PaddedButton::OnFocus() {
ScrollRectToVisible(GetLocalBounds());
}
-void PaddedButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
- if (HasFocus()) {
- canvas->DrawRect(gfx::Rect(2, 1, width() - 4, height() - 3),
- message_center::kFocusBorderColor);
- }
-}
-
gfx::Point PaddedButton::ComputePaddedImagePaintPosition(
const gfx::ImageSkia& image) {
gfx::Vector2d offset;
« no previous file with comments | « ui/message_center/views/padded_button.h ('k') | ui/views/controls/slider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698