output: Use "base" color for background in GUI output window.
authorBen Pfaff <blp@gnu.org>
Sun, 21 Jun 2009 04:30:57 +0000 (21:30 -0700)
committerBen Pfaff <blp@gnu.org>
Sun, 21 Jun 2009 04:30:57 +0000 (21:30 -0700)
The "base" color in GtkStyle is used as the background color for GTK+
widgets that display editable text, e.g. GtkEntry.  That's what we're
aiming for, eventually, with the PSPP GUI output, and the default
white "base" color looks better than the default gray background
color, so use it.

src/ui/gui/psppire-output-window.c

index f2f0ca2d2520c30a89ca23555cf2ecafa2c222e3..06692c2a26b11f7d8e1bbc3add73d593e4f51083 100644 (file)
@@ -165,6 +165,8 @@ psppire_output_submit (struct outp_driver *this, struct som_entity *entity)
       entity->class->area (rendering, &tw, &th);
 
       drawing_area = gtk_drawing_area_new ();
+      gtk_widget_modify_bg (GTK_WIDGET (drawing_area), GTK_STATE_NORMAL,
+                            &gtk_widget_get_style (drawing_area)->base[GTK_STATE_NORMAL]);
       g_object_set_data (G_OBJECT (drawing_area),
                          "entity", xmemdup (entity, sizeof *entity));
       gtk_widget_set_size_request (drawing_area, tw / 1024, th / 1024);
@@ -249,6 +251,9 @@ psppire_output_window_init (PsppireOutputWindow *window)
   window->output = GTK_LAYOUT (get_widget_assert (xml, "output"));
   window->y = 0;
 
+  gtk_widget_modify_bg (GTK_WIDGET (window->output), GTK_STATE_NORMAL,
+                        &gtk_widget_get_style (GTK_WIDGET (window->output))->base[GTK_STATE_NORMAL]);
+
   connect_help (xml);
 
   g_signal_connect (window,