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

Unified Diff: ui/message_center/views/notification_view.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/message_view.cc ('k') | ui/message_center/views/notifier_settings_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/notification_view.cc
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
index bcd1ea9ff96bb086af895be364b387b41da8ac41..1ed5c8388ab9b1387d5c3fc1258395d2ed1c9b12 100644
--- a/ui/message_center/views/notification_view.cc
+++ b/ui/message_center/views/notification_view.cc
@@ -322,7 +322,6 @@ class NotificationButton : public views::CustomButton {
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual int GetHeightForWidth(int width) OVERRIDE;
virtual void OnFocus() OVERRIDE;
- virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
// Overridden from views::CustomButton:
virtual void StateChanged() OVERRIDE;
@@ -344,6 +343,9 @@ NotificationButton::NotificationButton(views::ButtonListener* listener)
message_center::kButtonHorizontalPadding,
kButtonVecticalPadding,
message_center::kButtonIconToTitlePadding));
+ set_focus_border(views::FocusBorder::CreateSolidFocusBorder(
+ message_center::kFocusBorderColor,
+ gfx::Insets(1, 2, 2, 2)));
}
NotificationButton::~NotificationButton() {
@@ -397,13 +399,6 @@ void NotificationButton::OnFocus() {
ScrollRectToVisible(GetLocalBounds());
}
-void NotificationButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
- if (HasFocus()) {
- canvas->DrawRect(gfx::Rect(2, 1, width() - 4, height() - 3),
- message_center::kFocusBorderColor);
- }
-}
-
void NotificationButton::StateChanged() {
if (state() == STATE_HOVERED || state() == STATE_PRESSED) {
set_background(
« no previous file with comments | « ui/message_center/views/message_view.cc ('k') | ui/message_center/views/notifier_settings_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698