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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm

Issue 2299803003: [Mac][Material Design] Adjust focus ring position of bookmark bar items. (Closed)
Patch Set: Created 4 years, 3 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/cocoa/bookmarks/bookmark_button_cell.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
index 9c1dd58e4a23f19d72e143276491ca723b9e41d1..60d5d0551bbc14076f40971635cfbac0e2b813c5 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
@@ -395,15 +395,15 @@ const int kDefaultFontSize = 12;
- (void)drawFocusRingMaskWithFrame:(NSRect)cellFrame
inView:(NSView*)controlView {
if (ui::MaterialDesignController::IsModeMaterial()) {
- // In Material Design we have to move the focus ring over by 2 pts to get it
- // to line up with the image.
- if ([self visibleTitle].length > 0) {
- cellFrame.origin.x += 2;
- }
-
- // We also have to nudge the chevron button's focus ring up 2pts.
+ // In Material Design we have to adjust the focus ring slightly for the
+ // chevron and regular bookmark icons.
if ([self isOffTheSideButtonCell]) {
cellFrame.origin.y -= 2;
+ } else if ([self visibleTitle].length > 0) {
+ cellFrame.origin.x += 4;
+ }
+ if ([controlView cr_lineWidth] < 1) {
+ cellFrame.origin.y -= 0.5;
}
}
[super drawFocusRingMaskWithFrame:cellFrame inView:controlView];
« 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