summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 17:40:53 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 17:40:53 +0000
commit04fad1a53d9200550da5999712262a1dffec5f48 (patch)
tree8b2c4008d35cf2e95d8e22f62013ed285e4779da /chrome/browser
parenta39dc2a043e50f2e0ccd0c5910397093b1673413 (diff)
downloadchromium_src-04fad1a53d9200550da5999712262a1dffec5f48.zip
chromium_src-04fad1a53d9200550da5999712262a1dffec5f48.tar.gz
chromium_src-04fad1a53d9200550da5999712262a1dffec5f48.tar.bz2
GTK toolbar -
- fix vertical height in gtk theme mode - fix reload button showing two images when switching from gtk to chrome theme mode BUG=51325 TEST=1) switch from gtk to chrome theme mode, look at stop/reload 2) change desktop document font size from 10 to 18 in gtk theme mode, the omnibox should size appropriately for each font. Review URL: http://codereview.chromium.org/3086021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55253 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/gtk/browser_toolbar_gtk.cc9
-rw-r--r--chrome/browser/gtk/reload_button_gtk.cc2
2 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc
index 8055f38..f5f4d7f 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);
diff --git a/chrome/browser/gtk/reload_button_gtk.cc b/chrome/browser/gtk/reload_button_gtk.cc
index d679b84..bda9937 100644
--- a/chrome/browser/gtk/reload_button_gtk.cc
+++ b/chrome/browser/gtk/reload_button_gtk.cc
@@ -202,6 +202,8 @@ void ReloadButtonGtk::UpdateThemeButtons() {
gtk_widget_set_app_paintable(widget_.get(), FALSE);
gtk_widget_set_double_buffered(widget_.get(), TRUE);
} else {
+ gtk_button_set_image(GTK_BUTTON(widget()), NULL);
+
gtk_widget_set_size_request(widget_.get(), reload_.Width(),
reload_.Height());