diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 18:19:03 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 18:19:03 +0000 |
commit | 782dbfb3308173d51905addd039041bdf040ea89 (patch) | |
tree | 4a5c5a6144b595e6fa2012bad4a32a78ee4f30ff /app | |
parent | 5d8d79c73f2ed8b77241e90388ec286cc6e73132 (diff) | |
download | chromium_src-782dbfb3308173d51905addd039041bdf040ea89.zip chromium_src-782dbfb3308173d51905addd039041bdf040ea89.tar.gz chromium_src-782dbfb3308173d51905addd039041bdf040ea89.tar.bz2 |
GTK: Display explanatory message on sad tab page.
Also fix canvas text drawing bugs for certain vertical alignments.
BUG=25267
TEST=about:crash
Review URL: http://codereview.chromium.org/307015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29673 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/gfx/canvas_linux.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/gfx/canvas_linux.cc b/app/gfx/canvas_linux.cc index fc4e10e3..b08b4ce 100644 --- a/app/gfx/canvas_linux.cc +++ b/app/gfx/canvas_linux.cc @@ -186,11 +186,10 @@ void Canvas::DrawStringInt(const std::wstring& text, std::string utf8 = WideToUTF8(text); pango_layout_set_text(layout, utf8.data(), utf8.size()); - int width, height, chars_height; - pango_layout_get_size(layout, &width, &chars_height); + int width, height; + pango_layout_get_size(layout, &width, &height); width /= PANGO_SCALE; - // Pango returns the height of the characters, not the height of the font. - height = font.height(); + height /= PANGO_SCALE; if (flags & Canvas::TEXT_VALIGN_TOP) { // Cairo should draw from the top left corner already. |