From 2c287e07df9be7f12198b204dcfc3af7ca3db51a Mon Sep 17 00:00:00 2001 From: "deanm@chromium.org" Date: Thu, 16 Apr 2009 16:25:52 +0000 Subject: Bold matched portions of text in Linux Omnibox. - Refactor a bunch of the Pango attributes code. - Walk the classifications, and create the pango attributes for the text foreground color and weight (bolding). - Cache the GdkGC and PangoLayout across expose messages. Review URL: http://codereview.chromium.org/75041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13845 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete_popup_view_gtk.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'chrome/browser/autocomplete/autocomplete_popup_view_gtk.h') diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h index f515fa6..199fb23 100755 --- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h +++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h @@ -48,13 +48,18 @@ class AutocompletePopupViewGtk : public AutocompletePopupView { gboolean HandleExpose(GtkWidget* widget, GdkEventExpose* event); - PangoFontDescription* font_; - scoped_ptr model_; AutocompleteEditViewGtk* edit_view_; + // Our popup window, which is the only widget used, and we paint it on our + // own. This widget shouldn't be exposed outside of this class. GtkWidget* window_; + // The graphics context created from the window, cached across exposes. + GdkGC* gc_; + // The pango layout object created from the window, cached across exposes. + PangoLayout* layout_; + // Whether our popup is currently open / shown, or closed / hidden. bool opened_; DISALLOW_COPY_AND_ASSIGN(AutocompletePopupViewGtk); -- cgit v1.1