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

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

Issue 2313113002: [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 330f6547d4ebac50b962905be5e63bfe11e3e782..bb860e580b1b15567c7b2766c63f10d95791e0fe 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
@@ -403,15 +403,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