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

Unified Diff: chrome/browser/ui/gtk/constrained_window_gtk.cc

Issue 11040053: retry 160232 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 2 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 | « chrome/browser/ui/gtk/constrained_window_gtk.h ('k') | chrome/browser/ui/gtk/web_intent_picker_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/ui/gtk/constrained_window_gtk.h ('k') | chrome/browser/ui/gtk/web_intent_picker_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698