diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 21:55:31 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 21:55:31 +0000 |
commit | 6ebbc2204e842e1dd87693ec078b9dba1111c17a (patch) | |
tree | 935e2783bcff31b2fa995ceff7ac5dba2a0c5a3e /chrome/browser | |
parent | c445e9a8cfa2a86006f992ddd3260092fea2053e (diff) | |
download | chromium_src-6ebbc2204e842e1dd87693ec078b9dba1111c17a.zip chromium_src-6ebbc2204e842e1dd87693ec078b9dba1111c17a.tar.gz chromium_src-6ebbc2204e842e1dd87693ec078b9dba1111c17a.tar.bz2 |
Properly fix menu display when using dark system themes.
The drawing code in the tab strip was modifying the GC, which affected
the GC used for drawing menus.
Review URL: http://codereview.chromium.org/55022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12713 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/gtk/menu_gtk.cc | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/tab_strip_gtk.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/gtk/menu_gtk.cc b/chrome/browser/gtk/menu_gtk.cc index 7a55648..47a89f9 100644 --- a/chrome/browser/gtk/menu_gtk.cc +++ b/chrome/browser/gtk/menu_gtk.cc @@ -129,7 +129,7 @@ void MenuGtk::BuildMenuIn(GtkWidget* menu, } if (accel_group && menu_data->accel_key) { - // If we ever want to let the user do any key re-mapping, we'll need to + // If we ever want to let the user do any key remaping, we'll need to // change the following so we make a gtk_accel_map which keeps the actual // keys. gtk_widget_add_accelerator(menu_item, @@ -150,7 +150,6 @@ void MenuGtk::BuildMenuIn(GtkWidget* menu, gtk_menu_append(menu, menu_item); last_menu_item = menu_item; } - gtk_widget_modify_bg(menu, GTK_STATE_NORMAL, &gfx::kGdkWhite); } void MenuGtk::BuildMenuFromDelegate() { @@ -181,7 +180,6 @@ void MenuGtk::BuildMenuFromDelegate() { gtk_widget_show(menu_item); gtk_menu_shell_append(GTK_MENU_SHELL(menu_.get()), menu_item); } - gtk_widget_modify_bg(menu_.get(), GTK_STATE_NORMAL, &gfx::kGdkWhite); } // static diff --git a/chrome/browser/gtk/tab_strip_gtk.cc b/chrome/browser/gtk/tab_strip_gtk.cc index 94b2cc8..20b5308 100644 --- a/chrome/browser/gtk/tab_strip_gtk.cc +++ b/chrome/browser/gtk/tab_strip_gtk.cc @@ -239,7 +239,7 @@ void TabStripGtk::TileImageInt(GdkPixbuf* pixbuf, } void TabStripGtk::PaintTab(int index, bool selected) { - GdkGC* gc = tabstrip_.get()->style->fg_gc[GTK_WIDGET_STATE(tabstrip_.get())]; + GdkGC* gc = gdk_gc_new(tabstrip_.get()->window); TabImage& image = (selected) ? tab_active_ : tab_inactive_; TabData& data = tab_data_.at(index); gfx::Rect bounds = data.bounds; @@ -282,6 +282,8 @@ void TabStripGtk::PaintTab(int index, bool selected) { DrawImageInt(close_button_.normal, data.close_button_bounds.x(), data.close_button_bounds.y()); + + g_object_unref(gc); } //////////////////////////////////////////////////////////////////////////////// |