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

Unified Diff: ash/common/system/tray/tray_background_view.cc

Issue 2533903002: tweak the focus rectangle of TrayBackgroundView objects (Closed)
Patch Set: Created 4 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 | « ash/common/system/tray/tray_background_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_background_view.cc
diff --git a/ash/common/system/tray/tray_background_view.cc b/ash/common/system/tray/tray_background_view.cc
index 0e871965e2843dbd5e9c3f1228f91e6212d9e58c..8692abafa88522f5ee648609bb52f45998ee2ac0 100644
--- a/ash/common/system/tray/tray_background_view.cc
+++ b/ash/common/system/tray/tray_background_view.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "ash/common/ash_constants.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shelf/wm_shelf.h"
@@ -567,6 +568,12 @@ gfx::Rect TrayBackgroundView::GetFocusBounds() {
return GetContentsBounds();
}
+void TrayBackgroundView::OnPaintFocus(gfx::Canvas* canvas) {
+ gfx::Rect paint_bounds(GetFocusBounds());
+ paint_bounds.Inset(2, -2, 3, -2);
+ canvas->DrawSolidFocusRect(paint_bounds, kFocusBorderColor);
+}
+
void TrayBackgroundView::OnPaint(gfx::Canvas* canvas) {
ActionableView::OnPaint(canvas);
if (!MaterialDesignController::IsShelfMaterial() ||
« no previous file with comments | « ash/common/system/tray/tray_background_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698