summaryrefslogtreecommitdiff
path: root/gtk/gtkstyle.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-04-18 20:16:38 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-04-18 20:16:38 +0000
commitf8ceea8b354a75bd811341d1b8c73b55b464074a (patch)
tree6c392dd65c7ccb67d15fc2211f054049021fcbe0 /gtk/gtkstyle.c
parentc01a1c7363ec11353f3b87d5a9fdec96b5b15a30 (diff)
downloadgtk+-f8ceea8b354a75bd811341d1b8c73b55b464074a.tar.gz
Close bug #50615:
2001-04-18 Havoc Pennington <hp@redhat.com> Close bug #50615: * gtk/gtkstyle.c (gtk_default_draw_layout): Use text_gc to draw the layout * gtk/gtktext.c: Use base/text instead of bg/fg throughout * gtk/gtkentry.c: Use base/text instead of bg/fg throughout * gtk/gtktextdisplay.c: Use base/text instead of bg/fg throughout * gtk/gtkstyle.c (gtk_style_init): make GTK_STATE_SELECTED default to blue for base, in addition to bg
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r--gtk/gtkstyle.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index b749777020..d0c46fd91c 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -409,7 +409,8 @@ gtk_style_init (GtkStyle *style)
style->text[i] = style->fg[i];
style->base[i] = style->white;
}
-
+
+ style->base[GTK_STATE_SELECTED] = gtk_default_selected_bg;
style->base[GTK_STATE_INSENSITIVE] = gtk_default_prelight_bg;
style->text[GTK_STATE_INSENSITIVE] = gtk_default_insensitive_fg;
@@ -3913,7 +3914,7 @@ gtk_default_draw_layout (GtkStyle *style,
g_return_if_fail (window != NULL);
if (area)
- gdk_gc_set_clip_rectangle (style->fg_gc[state_type], area);
+ gdk_gc_set_clip_rectangle (style->text_gc[state_type], area);
if (state_type == GTK_STATE_INSENSITIVE)
{
@@ -3921,17 +3922,17 @@ gtk_default_draw_layout (GtkStyle *style,
ins = get_insensitive_layout (layout);
- gdk_draw_layout (window, style->fg_gc[state_type], x, y, ins);
+ gdk_draw_layout (window, style->text_gc[state_type], x, y, ins);
g_object_unref (G_OBJECT (ins));
}
else
{
- gdk_draw_layout (window, style->fg_gc[state_type], x, y, layout);
+ gdk_draw_layout (window, style->text_gc[state_type], x, y, layout);
}
if (area)
- gdk_gc_set_clip_rectangle (style->fg_gc[state_type], NULL);
+ gdk_gc_set_clip_rectangle (style->text_gc[state_type], NULL);
}
static void