diff options
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc | 3 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc index 566c8d2..4e6be71 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc @@ -16,6 +16,7 @@ #include "chrome/browser/gtk/location_bar_view_gtk.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/toolbar_model.h" +#include "chrome/common/gtk_util.h" #include "chrome/common/notification_service.h" #include "googleurl/src/gurl.h" @@ -86,6 +87,8 @@ void AutocompleteEditViewGtk::Init() { tag_table_ = gtk_text_tag_table_new(); text_buffer_ = gtk_text_buffer_new(tag_table_); text_view_ = gtk_text_view_new_with_buffer(text_buffer_); + // Until we switch to vector graphics, force the font size. + gtk_util::ForceFontSizePixels(text_view_, 13.4); // 13.4px == 10pt @ 96dpi // The text view was floating. It will now be owned by the alignment. gtk_container_add(GTK_CONTAINER(alignment_.get()), text_view_); diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc index 718b76c..ec74e648 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc @@ -248,7 +248,9 @@ AutocompletePopupViewGtk::AutocompletePopupViewGtk( // TODO(deanm): We might want to eventually follow what Windows does and // plumb a gfx::Font through. This is because popup windows have a // different font size, although we could just derive that font here. - PangoFontDescription* pfd = PangoFontFromGfxFont(gfx::Font()); + // For now, force the font size to 10pt. + gfx::Font font = gfx::Font::CreateFont(gfx::Font().FontName(), 10); + PangoFontDescription* pfd = PangoFontFromGfxFont(font); pango_layout_set_font_description(layout_, pfd); pango_font_description_free(pfd); |