diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 11:25:12 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 11:25:12 +0000 |
commit | 043f595af746dde480e57145485d4a9e06491555 (patch) | |
tree | d19ce9c988112b2a59840f1fd355b0bd836b8289 /chrome/browser | |
parent | bcdcb3e04f0e7667a28415c2a0320a9315a3a3a5 (diff) | |
download | chromium_src-043f595af746dde480e57145485d4a9e06491555.zip chromium_src-043f595af746dde480e57145485d4a9e06491555.tar.gz chromium_src-043f595af746dde480e57145485d4a9e06491555.tar.bz2 |
Fix a small undercalculation of the space available a result description.
Calculate from the actual text width, not the allocated text width.
Review URL: http://codereview.chromium.org/99222
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc index 1a997f2..9497334 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc @@ -440,9 +440,9 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget, // if there is also a description to be shown. bool has_description = !match.description.empty(); int text_width = window_rect.width() - (kIconAreaWidth + kRightPadding); - int content_width = has_description ? + int allocated_content_width = has_description ? text_width * kContentWidthPercentage : text_width; - pango_layout_set_width(layout_, content_width * PANGO_SCALE); + pango_layout_set_width(layout_, allocated_content_width * PANGO_SCALE); SetupLayoutForMatch(layout_, match.contents, match.contents_class, &kContentTextColor, std::string()); @@ -464,7 +464,7 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget, if (has_description) { pango_layout_set_width(layout_, - (text_width - content_width) * PANGO_SCALE); + (text_width - actual_content_width) * PANGO_SCALE); SetupLayoutForMatch(layout_, match.description, match.description_class, is_selected ? &kDescriptionSelectedTextColor : &kDescriptionTextColor, |