[PATCH 2/2] Force a background in the main GtkBox in anaconda windows.
David Shea
dshea at redhat.com
Thu Jan 8 19:59:20 UTC 2015
By default there is no background drawn, which is problematic for
GtkStack transitions where a new screen slides over the old one.
---
widgets/src/BaseWindow.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
index 9df46f5..a70f7cc 100644
--- a/widgets/src/BaseWindow.c
+++ b/widgets/src/BaseWindow.c
@@ -236,6 +236,7 @@ GtkWidget *anaconda_base_window_new() {
static void anaconda_base_window_init(AnacondaBaseWindow *win) {
char *markup;
AtkObject *atk;
+ GtkStyleContext *context;
win->priv = G_TYPE_INSTANCE_GET_PRIVATE(win,
ANACONDA_TYPE_BASE_WINDOW,
@@ -263,6 +264,13 @@ static void anaconda_base_window_init(AnacondaBaseWindow *win) {
win->priv->main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add(GTK_CONTAINER(win), win->priv->main_box);
+ /* GtkBoxes don't draw a background by default, which causes issues during
+ * transitions in a GtkStack. Work around this by forcing a "background"
+ * style class. See https://bugzilla.gnome.org/show_bug.cgi?id=742552
+ */
+ context = gtk_widget_get_style_context(win->priv->main_box);
+ gtk_style_context_add_class(context, "background");
+
/* Then the navigation area that sits as the first item in the main box
* for every Window class.
*/
--
2.1.0
More information about the anaconda-patches
mailing list