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

Unified Diff: chrome/browser/ui/cocoa/download/download_item_controller.mm

Issue 911303002: Fix text wrapping problem in the download_item_controller on Yosemite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/download/download_item_controller.mm
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller.mm b/chrome/browser/ui/cocoa/download/download_item_controller.mm
index a749d314579c501009632c98c6a7f44a10d4c642..d6f2a61c55dbbf24476ccdcae567cd6cc54a76f4 100644
--- a/chrome/browser/ui/cocoa/download/download_item_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_controller.mm
@@ -5,6 +5,7 @@
#import "chrome/browser/ui/cocoa/download/download_item_controller.h"
#include "base/mac/bundle_locations.h"
+#include "base/mac/mac_util.h"
#include "base/metrics/histogram.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
@@ -129,6 +130,16 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
- (void)awakeFromNib {
[progressView_ setController:self];
+ // The new system font on Yosemite brings slightly different font metrics.
+ // The |dangerousDownloadLabel_| is 22 points high with two lines of text
+ // in the nib, but on Yosemite it needs 24 points to hold that same text.
+ // See http://crbug.com/454782 .
+ if (base::mac::IsOSYosemite()) {
Nico 2015/02/11 03:45:53 IsOSYosemiteOrLater() probably?
shrike 2015/02/11 16:45:35 Done.
+ NSRect frame = [dangerousDownloadLabel_ frame];
+ frame.origin.y -= 1.0;
+ frame.size.height += 2.0;
+ [dangerousDownloadLabel_ setFrame:frame];
+ }
GTMUILocalizerAndLayoutTweaker* localizerAndLayoutTweaker =
[[[GTMUILocalizerAndLayoutTweaker alloc] init] autorelease];
[localizerAndLayoutTweaker applyLocalizer:localizer_ tweakingUI:[self view]];
« 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