diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 16:14:46 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-03 16:14:46 +0000 |
commit | 52ab8f9091d3892f5528d5a71655d75635d1e66c (patch) | |
tree | c66d682d7753e3021eb3072d32517334199e779b /chrome/common | |
parent | 5d6c69626c90ffce59fcb13eb8e66a29d400907b (diff) | |
download | chromium_src-52ab8f9091d3892f5528d5a71655d75635d1e66c.zip chromium_src-52ab8f9091d3892f5528d5a71655d75635d1e66c.tar.gz chromium_src-52ab8f9091d3892f5528d5a71655d75635d1e66c.tar.bz2 |
Always show file extensions in the shelf.
BUG=1208
Review URL: http://codereview.chromium.org/8991
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/gfx/chrome_canvas.cc | 9 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_canvas.h | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/chrome/common/gfx/chrome_canvas.cc b/chrome/common/gfx/chrome_canvas.cc index 064a931..3114b14 100644 --- a/chrome/common/gfx/chrome_canvas.cc +++ b/chrome/common/gfx/chrome_canvas.cc @@ -232,10 +232,13 @@ int ChromeCanvas::ComputeFormatFlags(int flags) { else if ((flags & SHOW_PREFIX) == 0) f |= DT_NOPREFIX; - if (flags & MULTI_LINE) + if (flags & MULTI_LINE) { f |= DT_WORDBREAK; - else - f |= DT_SINGLELINE | DT_END_ELLIPSIS | DT_VCENTER; + } else { + f |= DT_SINGLELINE | DT_VCENTER; + if (!(flags & NO_ELLIPSIS)) + f |= DT_END_ELLIPSIS; + } // vertical alignment if (flags & TEXT_VALIGN_TOP) diff --git a/chrome/common/gfx/chrome_canvas.h b/chrome/common/gfx/chrome_canvas.h index b32516d..b48fe0d 100644 --- a/chrome/common/gfx/chrome_canvas.h +++ b/chrome/common/gfx/chrome_canvas.h @@ -52,6 +52,9 @@ class ChromeCanvas : public gfx::PlatformCanvasWin { static const int SHOW_PREFIX = 128; static const int HIDE_PREFIX = 256; + // Prevent ellipsizing + static const int NO_ELLIPSIS = 512; + // Creates an empty ChromeCanvas. Callers must use initialize before using // the canvas. ChromeCanvas(); |