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

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

Issue 2011173002: Revert of [Mac][Material Design] Bring bookmark hover state, etc. up to spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 781517c8ae7ff7fff001c236fb1109aef096efed..e38e4a2d6261caba3c685c6d3c5e8f7c47e44907 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
@@ -25,8 +25,8 @@
const int kHierarchyButtonXMargin = 4;
const int kIconTextSpacer = 4;
-const int kTextRightPadding = 1;
-const int kIconLeftPadding = 1;
+const int kTextRightPadding = 3;
+const int kIconLeftPadding = 3;
const int kDefaultFontSize = 12;
@@ -330,9 +330,6 @@
[title sizeWithAttributes:[self titleTextAttributes]].width;
cellSize.width +=
kIconTextSpacer + std::ceil(textWidth) + kTextRightPadding;
- } else {
- // Make buttons without visible titles 20pts wide (18 plus padding).
- cellSize.width = 18;
}
}
@@ -348,7 +345,9 @@
// left edge, but only if there's a visible title.
if (ui::MaterialDesignController::IsModeMaterial()) {
imageRect.origin.y -= 1;
- imageRect.origin.x += kIconLeftPadding;
+ if ([[self visibleTitle] length]) {
+ imageRect.origin.x += kIconLeftPadding;
+ }
}
return imageRect;
}

Powered by Google App Engine
This is Rietveld 408576698