From a6941cb0100b276250c0f4c6661c49b6f7022b21 Mon Sep 17 00:00:00 2001 From: "deanm@chromium.org" Date: Thu, 7 May 2009 14:22:25 +0000 Subject: 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 --- chrome/browser/gtk/sad_tab_gtk.cc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'chrome/browser/gtk/sad_tab_gtk.cc') 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; } -- cgit v1.1