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

Unified Diff: chrome/browser/ui/cocoa/drag_util.mm

Issue 2862313004: Fix URL text drags. (Closed)
Patch Set: Created 3 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
« 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/drag_util.mm
diff --git a/chrome/browser/ui/cocoa/drag_util.mm b/chrome/browser/ui/cocoa/drag_util.mm
index 0ce31db0ca53cc0a05c1ac8c195a9758c2f1ae60..fd8c99386bdd90468f14e1587b55be6dc33e6638 100644
--- a/chrome/browser/ui/cocoa/drag_util.mm
+++ b/chrome/browser/ui/cocoa/drag_util.mm
@@ -151,10 +151,14 @@ NSImage* DragImageForBookmark(NSImage* favicon,
NSString* ns_title = base::SysUTF16ToNSString(title);
// Set the look of the title.
- NSDictionary* attrs =
- [NSDictionary dictionaryWithObject:[NSFont systemFontOfSize:
- [NSFont smallSystemFontSize]]
- forKey:NSFontAttributeName];
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraph_style(
+ [[NSMutableParagraphStyle alloc] init]);
+ [paragraph_style setLineBreakMode:NSLineBreakByClipping];
+ NSDictionary* attrs = @{
+ NSFontAttributeName :
+ [NSFont systemFontOfSize:[NSFont smallSystemFontSize]],
+ NSParagraphStyleAttributeName : paragraph_style
+ };
base::scoped_nsobject<NSAttributedString> rich_title(
[[NSAttributedString alloc] initWithString:ns_title attributes:attrs]);
« 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