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

Issue 2806066: Mac: Add nice fade effect to overflowing bookmark buttons in the bookmark bar (Closed)

Created:
10 years, 5 months ago by jeremy
Modified:
9 years, 6 months ago
Reviewers:
John Grabowski
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Mac: Add nice fade effect to overflowing bookmark buttons in the bookmark bar Port magic from GTMFadeTruncatingTextFieldCell to Chrome's GradientButtonCell, used by buttons in the bookmark bar. Any button that inherits from this class will now get overflowing titles truncated with a nice gradient (same as tab titles), rather than the default ellipsis. Using GTMFadeTruncatingTextFieldCell in this case wasn't feasible because bookmark buttons are subclasses of NSButtonCell and already use a bunch of specialized behavior provided by it. BUG=45104 TEST=Add a bookmark to the bookmark bar and increase the length of it's title. Once you get past a certain length, rather than truncate the title should fade out nicely. Exactly in the same way long tab titles do. Bookmark buttons with titles that aren't truncated should look exactly the same. Also test with Dolce & Gabbana theme which has inverted contrast. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=53773

Patch Set 1 #

Patch Set 2 : remove extra nl #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -0 lines) Patch
M chrome/browser/cocoa/gradient_button_cell.mm View 1 1 chunk +70 lines, -0 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
jeremy
10 years, 5 months ago (2010-07-21 14:32:59 UTC) #1
John Grabowski
10 years, 5 months ago (2010-07-21 17:19:22 UTC) #2
for TEST= add a test that uses a theme with an inverted contrast (e.g. Dolce
where text=white and background=dark).

LGTM

http://codereview.chromium.org/2806066/diff/2001/3001
File chrome/browser/cocoa/gradient_button_cell.mm (right):

http://codereview.chromium.org/2806066/diff/2001/3001#newcode466
chrome/browser/cocoa/gradient_button_cell.mm:466: // This method is copied in
the most part from GTMFadeTruncatingTextFieldCell.
Move comment to top of function.

Add brief comment explaining why we can't derive from
GTMFadeTruncatingTextFieldCell (in the code, not just in CL description).

Add brief explanations of differences from GTMFadeTruncatingTextFieldCell

Powered by Google App Engine
This is Rietveld 408576698