diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 22:52:52 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 22:52:52 +0000 |
commit | 16f9251aa41c321f7cf04d18b319a80c90690573 (patch) | |
tree | 5c6aa2fcaa6228befd0567cd9c7a28192a540127 /chrome/browser/gtk | |
parent | b099018494d8bcf24a8c7de3511f1e7b31590a61 (diff) | |
download | chromium_src-16f9251aa41c321f7cf04d18b319a80c90690573.zip chromium_src-16f9251aa41c321f7cf04d18b319a80c90690573.tar.gz chromium_src-16f9251aa41c321f7cf04d18b319a80c90690573.tar.bz2 |
GTK Themes: Fix spacing so page and app menus take up full height in GTK theme mode.
Review URL: http://codereview.chromium.org/159103
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21120 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r-- | chrome/browser/gtk/browser_toolbar_gtk.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc index ea39041..5c4a364 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.cc +++ b/chrome/browser/gtk/browser_toolbar_gtk.cc @@ -286,6 +286,13 @@ void BrowserToolbarGtk::Observe(NotificationType type, } } } else if (type == NotificationType::BROWSER_THEME_CHANGED) { + // Update the spacing around the menu buttons + int border = theme_provider_->UseGtkTheme() ? 0 : 2; + gtk_container_set_border_width( + GTK_CONTAINER(page_menu_button_.get()), border); + gtk_container_set_border_width( + GTK_CONTAINER(app_menu_button_.get()), border); + // Update the menu button images. gtk_image_set_from_pixbuf(GTK_IMAGE(page_menu_image_), theme_provider_->GetRTLEnabledPixbufNamed(IDR_MENU_PAGE)); @@ -375,11 +382,6 @@ GtkWidget* BrowserToolbarGtk::BuildToolbarMenuButton( GtkWidget* button = theme_provider_->BuildChromeButton(); owner->Own(button); - // TODO(erg): This was under conditional for gtk, but after playing around - // with not having it under conditional, I actually think this is correct - // instead. Investigate more later. - gtk_container_set_border_width(GTK_CONTAINER(button), 2); - gtk_widget_set_tooltip_text(button, localized_tooltip.c_str()); g_signal_connect(button, "button-press-event", G_CALLBACK(OnMenuButtonPressEvent), this); |