summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 00:27:37 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 00:27:37 +0000
commit2eb6df72962889a80a45e593a0e8abfbcb04f352 (patch)
tree6eb8d45606745c947b565cb87dfabf55b0386fcf /chrome
parent232d6d9e054af229456bccb2cbf83d75704663ea (diff)
downloadchromium_src-2eb6df72962889a80a45e593a0e8abfbcb04f352.zip
chromium_src-2eb6df72962889a80a45e593a0e8abfbcb04f352.tar.gz
chromium_src-2eb6df72962889a80a45e593a0e8abfbcb04f352.tar.bz2
Fixes regression where bookmark manager would show black background
when not results are found for a search string. Using your halo methods does the trick. BUG=8367 TEST=see bug Review URL: http://codereview.chromium.org/39165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10944 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/bookmark_table_view.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/views/bookmark_table_view.cc b/chrome/browser/views/bookmark_table_view.cc
index a3e92df..6e5bada 100644
--- a/chrome/browser/views/bookmark_table_view.cc
+++ b/chrome/browser/views/bookmark_table_view.cc
@@ -428,8 +428,10 @@ void BookmarkTableView::PaintAltText() {
ChromeFont font = GetAltTextFont();
gfx::Rect bounds = GetAltTextBounds();
ChromeCanvas canvas(bounds.width(), bounds.height(), false);
- canvas.DrawStringInt(alt_text_, font, SK_ColorDKGRAY, 0, 0, bounds.width(),
- bounds.height());
+ // Pad by 1 for halo.
+ canvas.DrawStringWithHalo(alt_text_, font, SK_ColorDKGRAY, SK_ColorWHITE, 1,
+ 1, bounds.width() - 2, bounds.height() - 2,
+ ChromeCanvas::TEXT_ALIGN_LEFT);
canvas.getTopPlatformDevice().drawToHDC(dc, bounds.x(), bounds.y(), NULL);
ReleaseDC(GetNativeControlHWND(), dc);
}
@@ -440,8 +442,9 @@ gfx::Rect BookmarkTableView::GetAltTextBounds() {
CRect client_rect;
GetClientRect(GetNativeControlHWND(), client_rect);
ChromeFont font = GetAltTextFont();
+ // Pad height by 2 for halo.
return gfx::Rect(kXOffset, content_offset(), client_rect.Width() - kXOffset,
- std::max(kImageSize, font.height()));
+ std::max(kImageSize, font.height() + 2));
}
ChromeFont BookmarkTableView::GetAltTextFont() {