From: Ben Pfaff Date: Sun, 21 Jun 2009 04:30:57 +0000 (-0700) Subject: output: Use "base" color for background in GUI output window. X-Git-Tag: v0.7.3~28 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3aed988c27ca4a37a5f5102c18012c3983a7191;p=pspp-builds.git output: Use "base" color for background in GUI output window. 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. --- diff --git a/src/ui/gui/psppire-output-window.c b/src/ui/gui/psppire-output-window.c index f2f0ca2d..06692c2a 100644 --- a/src/ui/gui/psppire-output-window.c +++ b/src/ui/gui/psppire-output-window.c @@ -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, + >k_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, + >k_widget_get_style (GTK_WIDGET (window->output))->base[GTK_STATE_NORMAL]); + connect_help (xml); g_signal_connect (window,