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

Side by Side Diff: chrome/browser/cocoa/download_shelf_controller.mm

Issue 173621: Use Lucida Grande instead of Helvetica for "Show all downloads..." link in download shelf. (Closed)
Patch Set: Created 11 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/app/nibs/DownloadShelf.xib ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/cocoa/download_shelf_controller.h" 5 #import "chrome/browser/cocoa/download_shelf_controller.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return self; 64 return self;
65 } 65 }
66 66
67 - (void)awakeFromNib { 67 - (void)awakeFromNib {
68 // Initialize "Show all downloads" link. 68 // Initialize "Show all downloads" link.
69 69
70 scoped_nsobject<NSMutableParagraphStyle> paragraphStyle( 70 scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
71 [[NSParagraphStyle defaultParagraphStyle] mutableCopy]); 71 [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
72 [paragraphStyle.get() setAlignment:NSRightTextAlignment]; 72 [paragraphStyle.get() setAlignment:NSRightTextAlignment];
73 73
74 NSFont* font = [NSFont systemFontOfSize:
75 [NSFont systemFontSizeForControlSize:NSRegularControlSize]];
74 NSDictionary* linkAttributes = [NSDictionary dictionaryWithObjectsAndKeys: 76 NSDictionary* linkAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
75 @"", NSLinkAttributeName, 77 @"", NSLinkAttributeName,
76 [NSCursor pointingHandCursor], NSCursorAttributeName, 78 [NSCursor pointingHandCursor], NSCursorAttributeName,
77 paragraphStyle.get(), NSParagraphStyleAttributeName, 79 paragraphStyle.get(), NSParagraphStyleAttributeName,
80 font, NSFontAttributeName,
78 nil]; 81 nil];
79 NSString* text = 82 NSString* text =
80 base::SysWideToNSString(l10n_util::GetString(IDS_SHOW_ALL_DOWNLOADS)); 83 base::SysWideToNSString(l10n_util::GetString(IDS_SHOW_ALL_DOWNLOADS));
81 scoped_nsobject<NSAttributedString> linkText([[NSAttributedString alloc] 84 scoped_nsobject<NSAttributedString> linkText([[NSAttributedString alloc]
82 initWithString:text attributes:linkAttributes]); 85 initWithString:text attributes:linkAttributes]);
83 86
84 [[showAllDownloadsLink_ textStorage] setAttributedString:linkText.get()]; 87 [[showAllDownloadsLink_ textStorage] setAttributedString:linkText.get()];
85 [showAllDownloadsLink_ setDelegate:self]; 88 [showAllDownloadsLink_ setDelegate:self];
86 89
87 [self resizeDownloadLinkToFit]; 90 [self resizeDownloadLinkToFit];
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (isTransferDone && 278 if (isTransferDone &&
276 [itemController download]->safety_state() != DownloadItem::DANGEROUS) { 279 [itemController download]->safety_state() != DownloadItem::DANGEROUS) {
277 [self remove:itemController]; 280 [self remove:itemController];
278 } else { 281 } else {
279 ++i; 282 ++i;
280 } 283 }
281 } 284 }
282 } 285 }
283 286
284 @end 287 @end
OLDNEW
« no previous file with comments | « chrome/app/nibs/DownloadShelf.xib ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698