summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h3
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm22
2 files changed, 15 insertions, 10 deletions
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h
index 5a9eb67..803a77d 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h
@@ -14,6 +14,7 @@
class Browser;
class ExtensionLoadedNotificationObserver;
+@class HyperlinkTextView;
@class HoverCloseButton;
@class InfoBubbleView;
@@ -90,7 +91,7 @@ typedef enum {
// text views cannot conveniently be created in IB. The xib file contains
// a text field |promoPlaceholder_| that's replaced by this text view |promo_|
// in -awakeFromNib.
- scoped_nsobject<NSTextView> promo_;
+ scoped_nsobject<HyperlinkTextView> promo_;
// Only shown for bundle installs.
IBOutlet NSTextField* installedHeadingMsg_;
IBOutlet NSTextField* installedItemsMsg_;
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
index 32873ca..81beb7f 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
@@ -17,6 +17,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/chrome_style.h"
#include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
#include "chrome/browser/ui/cocoa/browser_window_controller.h"
#include "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h"
@@ -439,26 +440,26 @@ class ExtensionLoadedNotificationObserver
// First calculate the height of the sign-in promo.
NSFont* font = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]];
- string16 link(l10n_util::GetStringFUTF16(
+ NSString* link(l10n_util::GetNSStringFWithFixup(
IDS_EXTENSION_INSTALLED_SIGNIN_PROMO_LINK,
l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
- string16 message(l10n_util::GetStringUTF16(
- IDS_EXTENSION_INSTALLED_SIGNIN_PROMO));
+ NSString* message(l10n_util::GetNSStringWithFixup(
+ IDS_EXTENSION_INSTALLED_SIGNIN_PROMO));
- HyperlinkTextView* view = (HyperlinkTextView*)promo_.get();
- [view setMessageAndLink:base::SysUTF16ToNSString(message)
- withLink:base::SysUTF16ToNSString(link)
+ HyperlinkTextView* view = promo_.get();
+ [view setMessageAndLink:message
+ withLink:link
atOffset:0
font:font
messageColor:[NSColor blackColor]
- linkColor:[NSColor blueColor]];
+ linkColor:gfx::SkColorToCalibratedNSColor(
+ chrome_style::GetLinkColor())];
// HACK! The TextView does not report correct height even after you stuff
// it with text (it tells you it is single-line even if it is multiline), so
// here the hidden howToUse_ TextField is temporarily repurposed to
// calculate the correct height for the TextView.
- [howToUse_ setStringValue:base::SysUTF16ToNSString(link + message)];
- [[howToUse_ cell] setFont:font];
+ [[howToUse_ cell] setAttributedStringValue:[promo_ attributedString]];
[GTMUILocalizerAndLayoutTweaker
sizeToFitFixedWidthTextField:howToUse_];
sync_promo_height = NSHeight([howToUse_ frame]);
@@ -533,6 +534,9 @@ class ExtensionLoadedNotificationObserver
[manageShortcutLink_ setHidden:NO];
[[manageShortcutLink_ cell]
setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [[manageShortcutLink_ cell]
+ setTextColor:gfx::SkColorToCalibratedNSColor(
+ chrome_style::GetLinkColor())];
[GTMUILocalizerAndLayoutTweaker sizeToFitView:manageShortcutLink_];
newWindowHeight += extension_installed_bubble::kInnerVerticalMargin;
newWindowHeight += NSHeight([manageShortcutLink_ frame]);