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

Issue 3086021: GTK toolbar - (Closed)

Created:
10 years, 4 months ago by Evan Stade
Modified:
9 years, 6 months ago
Reviewers:
Elliot Glaysher
CC:
chromium-reviews, ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=55253

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -2 lines) Patch
M chrome/browser/gtk/browser_toolbar_gtk.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/gtk/reload_button_gtk.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Evan Stade
10 years, 4 months ago (2010-08-06 17:13:00 UTC) #1
Elliot Glaysher
10 years, 4 months ago (2010-08-06 17:23:02 UTC) #2
LGTM.

On Fri, Aug 6, 2010 at 10:13 AM,  <estade@chromium.org> wrote:
> Reviewers: Elliot Glaysher,
>
> Description:
> 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.
>
> Please review this at http://codereview.chromium.org/3086021/show
>
> SVN Base: http://src.chromium.org/git/chromium.git
>
> Affected files:
>  M chrome/browser/gtk/browser_toolbar_gtk.cc
>  M chrome/browser/gtk/reload_button_gtk.cc
>
>
> 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);
>
> Index: chrome/browser/gtk/reload_button_gtk.cc
> diff --git a/chrome/browser/gtk/reload_button_gtk.cc
> b/chrome/browser/gtk/reload_button_gtk.cc
> index
>
d679b8447061b27a90040795023279d2f8ce0faa..bda993748eb436eb0c8f942b5816f353337397fa
> 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());
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698