Chromium Code Reviews| Index: chrome/browser/ui/gtk/constrained_window_gtk.cc |
| diff --git a/chrome/browser/ui/gtk/constrained_window_gtk.cc b/chrome/browser/ui/gtk/constrained_window_gtk.cc |
| index 5b6bdbec60e5c6b5569661f48527c8535409f625..2d41036b57645138b7b7a29712218b4a0c664b78 100644 |
| --- a/chrome/browser/ui/gtk/constrained_window_gtk.cc |
| +++ b/chrome/browser/ui/gtk/constrained_window_gtk.cc |
| @@ -57,13 +57,6 @@ ConstrainedWindowGtk::ConstrainedWindowGtk( |
| ui::kContentAreaBorder, ui::kContentAreaBorder); |
| } |
| - GdkColor background; |
| - if (delegate->GetBackgroundColor(&background)) { |
| - gtk_widget_modify_base(ebox, GTK_STATE_NORMAL, &background); |
| - gtk_widget_modify_fg(ebox, GTK_STATE_NORMAL, &background); |
| - gtk_widget_modify_bg(ebox, GTK_STATE_NORMAL, &background); |
| - } |
| - |
| if (gtk_widget_get_parent(dialog)) |
| gtk_widget_reparent(dialog, alignment); |
| else |
| @@ -73,6 +66,8 @@ ConstrainedWindowGtk::ConstrainedWindowGtk( |
| gtk_container_add(GTK_CONTAINER(ebox), frame); |
| border_.Own(ebox); |
| + BackgroundColorChanged(); |
|
Evan Stade
2012/10/05 09:04:51
the fix was moving this below L67.
|
| + |
| gtk_widget_add_events(widget(), GDK_KEY_PRESS_MASK); |
| g_signal_connect(widget(), "key-press-event", G_CALLBACK(OnKeyPressThunk), |
| this); |
| @@ -130,6 +125,15 @@ void ConstrainedWindowGtk::FocusConstrainedWindow() { |
| } |
| } |
| +void ConstrainedWindowGtk::BackgroundColorChanged() { |
| + GdkColor background; |
| + if (delegate_->GetBackgroundColor(&background)) { |
| + gtk_widget_modify_base(border_.get(), GTK_STATE_NORMAL, &background); |
| + gtk_widget_modify_fg(border_.get(), GTK_STATE_NORMAL, &background); |
| + gtk_widget_modify_bg(border_.get(), GTK_STATE_NORMAL, &background); |
| + } |
| +} |
| + |
| ConstrainedWindowGtk::TabContentsViewType* |
| ConstrainedWindowGtk::ContainingView() { |
| return |