From b8e8d770e3797663d6e5d69e374f51450f7ce7b7 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Mon, 14 Sep 2009 20:12:55 +0000 Subject: GTK: Adjust toolbar padding. Pixel-perfect with Windows. BUG=21772 Review URL: http://codereview.chromium.org/203054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26148 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gtk/browser_toolbar_gtk.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'chrome/browser') diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc index 87f2d5a..836f307 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.cc +++ b/chrome/browser/gtk/browser_toolbar_gtk.cc @@ -52,6 +52,9 @@ const int kToolbarHeight = 29; // Padding within the toolbar above the buttons and location bar. const int kTopPadding = 4; +// Exterior padding on left/right of toolbar. +const int kLeftRightPadding = 2; + // Height of the toolbar in pixels when we only show the location bar. const int kToolbarHeightLocationBarOnly = kToolbarHeight - 2; @@ -155,7 +158,8 @@ void BrowserToolbarGtk::Init(Profile* profile, toolbar_ = gtk_hbox_new(FALSE, kToolbarWidgetSpacing); GtkWidget* alignment = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), - ShouldOnlyShowLocation() ? 0 : kTopPadding, 0, 0, 0); + ShouldOnlyShowLocation() ? 0 : kTopPadding, 0, + kLeftRightPadding, kLeftRightPadding); g_signal_connect(alignment, "expose-event", G_CALLBACK(&OnAlignmentExpose), this); gtk_container_add(GTK_CONTAINER(event_box_), alignment); -- cgit v1.1