[gtk+/wip/cssvalue: 30/142] window: Set parent context instead of just resetting style
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssvalue: 30/142] window: Set parent context instead of just resetting style
- Date: Sat, 7 Apr 2012 19:48:53 +0000 (UTC)
commit 20a025d40a9f150e9246f528beb30fc87cfb4909
Author: Benjamin Otte <otte redhat com>
Date: Tue Mar 20 18:08:08 2012 +0100
window: Set parent context instead of just resetting style
Otherwise the inherit properties won't inherit properly.
gtk/gtkwindow.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 19acb32..023416c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2642,6 +2642,7 @@ void
gtk_window_set_attached_to (GtkWindow *window,
GtkWidget *attach_widget)
{
+ GtkStyleContext *context;
GtkWindowPrivate *priv;
g_return_if_fail (GTK_IS_WINDOW (window));
@@ -2664,7 +2665,11 @@ gtk_window_set_attached_to (GtkWindow *window,
}
/* Update the style, as the widget path might change. */
- gtk_widget_reset_style (GTK_WIDGET (window));
+ context = gtk_widget_get_style_context (GTK_WIDGET (window));
+ if (priv->attach_widget)
+ gtk_style_context_set_parent (context, gtk_widget_get_style_context (priv->attach_widget));
+ else
+ gtk_style_context_set_parent (context, NULL);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]