From d151a5ef5e357e7d7187fcc1aa8fbb6c31f223cb Mon Sep 17 00:00:00 2001 From: "inferno@chromium.org" Date: Fri, 9 Jul 2010 17:02:09 +0000 Subject: Fix eliding, truncation issues with hostnames in security information dialog for windows, linux platforms resp. BUG=48597 TEST=None Review URL: http://codereview.chromium.org/2958002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51972 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gtk/page_info_window_gtk.cc | 3 +++ chrome/browser/views/page_info_window_view.cc | 3 +++ 2 files changed, 6 insertions(+) (limited to 'chrome') diff --git a/chrome/browser/gtk/page_info_window_gtk.cc b/chrome/browser/gtk/page_info_window_gtk.cc index ada3f81..ceefbe2 100644 --- a/chrome/browser/gtk/page_info_window_gtk.cc +++ b/chrome/browser/gtk/page_info_window_gtk.cc @@ -165,6 +165,9 @@ GtkWidget* PageInfoWindowGtk::CreateSection( label = gtk_label_new(UTF16ToUTF8(section.description).c_str()); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); + // Allow linebreaking in the middle of words if necessary, so that extremely + // long hostnames (longer than one line) will still be completely shown. + gtk_label_set_line_wrap_mode(GTK_LABEL(label), PANGO_WRAP_WORD_CHAR); gtk_box_pack_start(GTK_BOX(text_box), label, FALSE, FALSE, 0); gtk_widget_set_size_request(label, 400, -1); diff --git a/chrome/browser/views/page_info_window_view.cc b/chrome/browser/views/page_info_window_view.cc index dbc790c..ea573d8 100644 --- a/chrome/browser/views/page_info_window_view.cc +++ b/chrome/browser/views/page_info_window_view.cc @@ -369,6 +369,9 @@ Section::Section(const string16& title, description_label_ = new views::Label(UTF16ToWideHack(description)); description_label_->SetMultiLine(true); description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); + // Allow linebreaking in the middle of words if necessary, so that extremely + // long hostnames (longer than one line) will still be completely shown. + description_label_->SetAllowCharacterBreak(true); AddChildView(description_label_); } -- cgit v1.1