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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_controller.mm

Issue 6783015: Improvements to tab title prefix eliding as per email discussions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/tabs/tab_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/tabs/tab_controller.mm (revision 79877)
+++ chrome/browser/ui/cocoa/tabs/tab_controller.mm (working copy)
@@ -22,6 +22,7 @@
@synthesize mini = mini_;
@synthesize pinned = pinned_;
@synthesize target = target_;
+@synthesize url = url_;
@synthesize iconView = iconView_;
@synthesize titleView = titleView_;
@synthesize closeButton = closeButton_;
@@ -308,8 +309,8 @@
DCHECK([[titleView_ cell] isKindOfClass:
[GTMFadeTruncatingTextFieldCell class]]);
GTMFadeTruncatingTextFieldCell* cell = [titleView_ cell];
- [cell setDesiredCharactersToTruncateFromHead:length];
- [cell setTruncateMode:length > 0 ? GTMFadeTruncatingHeadAndTail :
+ [cell setDesiredCharactersToTruncateFromHead:length - 4];
Peter Kasting 2011/04/01 17:28:31 Nit: Use constants for these and put the constants
MAD 2011/04/01 19:47:37 Done.
+ [cell setTruncateMode:length > 7 ? GTMFadeTruncatingHeadAndTail :
GTMFadeTruncatingTail];
}

Powered by Google App Engine
This is Rietveld 408576698