Chromium Code Reviews| 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]]; |