diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-07 14:22:25 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-07 14:22:25 +0000 |
commit | a6941cb0100b276250c0f4c6661c49b6f7022b21 (patch) | |
tree | b3d3e9ebb1391d26976f07621384a0e716da4c62 /chrome/browser/gtk/sad_tab_gtk.cc | |
parent | c7d4b80edc966b4355f3918ff65aec9ef1411dd1 (diff) | |
download | chromium_src-a6941cb0100b276250c0f4c6661c49b6f7022b21.zip chromium_src-a6941cb0100b276250c0f4c6661c49b6f7022b21.tar.gz chromium_src-a6941cb0100b276250c0f4c6661c49b6f7022b21.tar.bz2 |
Change the Linux sad tab message wrapping to match Windows.
Allow the message to go multiline, and it will just clip if it can't fit.
Review URL: http://codereview.chromium.org/113099
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15545 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/sad_tab_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/sad_tab_gtk.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/chrome/browser/gtk/sad_tab_gtk.cc b/chrome/browser/gtk/sad_tab_gtk.cc index 594b2ad..e11f3aa 100644 --- a/chrome/browser/gtk/sad_tab_gtk.cc +++ b/chrome/browser/gtk/sad_tab_gtk.cc @@ -110,14 +110,18 @@ gboolean SadTabGtk::OnExpose(GtkWidget* widget, GdkEventExpose* event) const { ChromeCanvas::TEXT_ALIGN_CENTER); // Paint the explanatory message. - canvas.DrawStringInt(sad_tab_constants.message, - sad_tab_constants.message_font, - kMessageTextColor, - 0, - message_y_, - width_, - sad_tab_constants.message_font.height(), - ChromeCanvas::TEXT_ALIGN_CENTER); + canvas.DrawStringInt( + sad_tab_constants.message, + sad_tab_constants.message_font, + kMessageTextColor, + 0, + message_y_, + width_, + 99999, // Let the height be large, and we'll clip if needed. + ChromeCanvas::TEXT_ALIGN_CENTER | + ChromeCanvas::MULTI_LINE | + ChromeCanvas::TEXT_VALIGN_TOP); + return TRUE; } |