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

Unified Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 312233003: Add fade eliding for Views Labels; related cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refine alignment check; minor additional cleanup. Created 6 years, 6 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
Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
index 14d0837a668f79de6becfbb52ec5a26f25c63993..c1b84666aebe8bc76e466633013286a66a890d66 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -111,11 +111,8 @@ void SetWindowSize(NSWindow* window, NSSize size) {
}
NSString* ElideEmail(const std::string& email, CGFloat width) {
- base::string16 elidedEmail = gfx::ElideEmail(
- base::UTF8ToUTF16(email),
- ui::ResourceBundle::GetSharedInstance().GetFontList(
- ui::ResourceBundle::BaseFont),
- width);
+ const base::string16 elidedEmail = gfx::ElideText(
+ base::UTF8ToUTF16(email), gfx::FontList(), width, gfx::ELIDE_EMAIL);
return base::SysUTF16ToNSString(elidedEmail);
}
@@ -1352,10 +1349,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
l10n_util::GetStringFUTF16(
IDS_SYNC_START_SYNC_BUTTON_LABEL,
l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)),
- ui::ResourceBundle::GetSharedInstance().GetFontList(
- ui::ResourceBundle::BaseFont),
- rect.size.width,
- gfx::ELIDE_AT_END));
+ gfx::FontList(), rect.size.width, gfx::ELIDE_TAIL));
[link setTitle:elidedButtonText];
[link setTarget:self];
@@ -1482,10 +1476,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
NSString* elidedButtonText = base::SysUTF16ToNSString(gfx::ElideText(
l10n_util::GetStringFUTF16(
IDS_PROFILES_PROFILE_ADD_ACCOUNT_BUTTON, item.name),
- ui::ResourceBundle::GetSharedInstance().GetFontList(
- ui::ResourceBundle::BaseFont),
- rect.size.width,
- gfx::ELIDE_AT_END));
+ gfx::FontList(), rect.size.width, gfx::ELIDE_TAIL));
NSButton* addAccountsButton =
[self linkButtonWithTitle:elidedButtonText

Powered by Google App Engine
This is Rietveld 408576698