Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2574)

Unified Diff: chrome/browser/gtk/browser_toolbar_gtk.cc

Issue 3086021: GTK toolbar - (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/reload_button_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_toolbar_gtk.cc
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc
index 8055f384ae807179e8a56a43a31b6740e4f39444..f5f4d7f0cfe14340ea91c211afb8986d1ee0a022 100644
--- a/chrome/browser/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/gtk/browser_toolbar_gtk.cc
@@ -81,6 +81,10 @@ const int kUpgradeDotOffset = 6;
// of a half-throb).
const int kThrobDuration = 1000;
+void SetWidgetHeightRequest(GtkWidget* widget, gpointer user_data) {
+ gtk_widget_set_size_request(widget, -1, GPOINTER_TO_INT(user_data));
+}
+
} // namespace
// BrowserToolbarGtk, public ---------------------------------------------------
@@ -382,13 +386,14 @@ void BrowserToolbarGtk::Observe(NotificationType type,
GTK_CONTAINER(wrench_menu_button_->widget()), border);
// Force the height of the toolbar so we get the right amount of padding
- // above and below the location bar. We always force the size of the hboxes
+ // above and below the location bar. We always force the size of the widgets
// to either side of the location box, but we only force the location box
// size in chrome-theme mode because that's the only time we try to control
// the font size.
int toolbar_height = ShouldOnlyShowLocation() ?
kToolbarHeightLocationBarOnly : kToolbarHeight;
- gtk_widget_set_size_request(toolbar_left_, -1, toolbar_height);
+ gtk_container_foreach(GTK_CONTAINER(toolbar_), SetWidgetHeightRequest,
+ GINT_TO_POINTER(toolbar_height));
gtk_widget_set_size_request(location_hbox_, -1,
use_gtk ? -1 : toolbar_height);
« no previous file with comments | « no previous file | chrome/browser/gtk/reload_button_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698