summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-28 20:46:00 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-28 20:46:00 +0000
commit4a3ce0521ea4879c05bc7cf2e629347d9497056c (patch)
tree0fa03eee73f5119f3c0d05de845c016ded12c126 /chrome
parentab5f8d8f0445831a679f8fb8377e159d5f282a7c (diff)
downloadchromium_src-4a3ce0521ea4879c05bc7cf2e629347d9497056c.zip
chromium_src-4a3ce0521ea4879c05bc7cf2e629347d9497056c.tar.gz
chromium_src-4a3ce0521ea4879c05bc7cf2e629347d9497056c.tar.bz2
GTK: Fix padding of the page/app menus.
In r47478, I removed the hbox that the page and app menus were in because I though that with the new left/right toolbar boxes, they were unnecessary. But they're needed to group the two buttons together with no space between them, but with padding on the right. BUG=none TEST=none Review URL: http://codereview.chromium.org/2375002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48522 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/browser_toolbar_gtk.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc
index e766348..822bf22 100644
--- a/chrome/browser/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/gtk/browser_toolbar_gtk.cc
@@ -191,6 +191,9 @@ void BrowserToolbarGtk::Init(Profile* profile,
FALSE, FALSE, 0);
}
+ // We need another hbox for the menu buttons so we can place them together,
+ // but still have some padding to their collective left/right.
+ GtkWidget* menus_hbox = gtk_hbox_new(FALSE, 0);
GtkWidget* page_menu = BuildToolbarMenuButton(
l10n_util::GetStringUTF8(IDS_PAGEMENU_TOOLTIP),
&page_menu_button_);
@@ -200,7 +203,7 @@ void BrowserToolbarGtk::Init(Profile* profile,
gtk_container_add(GTK_CONTAINER(page_menu), page_menu_image_);
page_menu_.reset(new MenuGtk(this, &page_menu_model_));
- gtk_box_pack_start(GTK_BOX(toolbar_right_), page_menu, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(menus_hbox), page_menu, FALSE, FALSE, 0);
GtkWidget* chrome_menu = BuildToolbarMenuButton(
l10n_util::GetStringFUTF8(IDS_APPMENU_TOOLTIP,
@@ -212,7 +215,9 @@ void BrowserToolbarGtk::Init(Profile* profile,
gtk_container_add(GTK_CONTAINER(chrome_menu), app_menu_image_);
app_menu_.reset(new MenuGtk(this, &app_menu_model_));
- gtk_box_pack_start(GTK_BOX(toolbar_right_), chrome_menu, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(menus_hbox), chrome_menu, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(toolbar_right_), menus_hbox, FALSE, FALSE,
+ kToolbarWidgetSpacing);
gtk_box_pack_start(GTK_BOX(toolbar_), toolbar_right_, FALSE, FALSE, 0);