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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm

Issue 2927193002: Omnibox UI: Create right-margin on Cocoa dropdown (Closed)
Patch Set: merge Created 3 years, 6 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/omnibox/omnibox_popup_matrix.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm
index 86a132b9df316d9063a153fe288ab4c5e0e2754c..93ec8a784d43163f0defb6a9378e78fd0a60f653 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm
@@ -122,8 +122,8 @@ const NSInteger kMiddleButtonNumber = 2;
base::mac::ObjCCastStrict<OmniboxPopupCellData>(
[array_ objectAtIndex:row]);
// Subtract any Material Design padding and/or icon.
- rowRect.size.width = [OmniboxPopupCell getContentAreaWidth:rowRect] -
- [matrix contentLeftPadding];
+ rowRect.size.width =
+ [OmniboxPopupCell getTextContentAreaWidth:[matrix contentMaxWidth]];
NSAttributedString* text = [cellData description];
// Provide no more than 3 lines of space.
rowRect.size.height =
@@ -146,6 +146,7 @@ const NSInteger kMiddleButtonNumber = 2;
@synthesize separator = separator_;
@synthesize maxMatchContentsWidth = maxMatchContentsWidth_;
@synthesize contentLeftPadding = contentLeftPadding_;
+@synthesize contentMaxWidth = contentMaxWidth_;
@synthesize answerLineHeight = answerLineHeight_;
@synthesize hasDarkTheme = hasDarkTheme_;
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698