Commit GtkToggleButton fix to HEAD too.

This commit is contained in:
Anders Carlsson
2000-12-02 18:05:34 +00:00
parent 35876710dc
commit b18bb07b2d
8 changed files with 65 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2000-20-01 Anders Carlsson <andersca@gnu.org>
* gtk/gtktogglebutton.c (gtk_toggle_button_draw): Fix bug when
a GtkToggleButton is both insensitive and active, it was being
drawn by the GtkButton draw handler which doesn't check the
state. Now it's calling gtk_toggle_button_paint instead.
2000-11-30 Havoc Pennington <hp@pobox.com> 2000-11-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create * gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create

View File

@ -1,3 +1,10 @@
2000-20-01 Anders Carlsson <andersca@gnu.org>
* gtk/gtktogglebutton.c (gtk_toggle_button_draw): Fix bug when
a GtkToggleButton is both insensitive and active, it was being
drawn by the GtkButton draw handler which doesn't check the
state. Now it's calling gtk_toggle_button_paint instead.
2000-11-30 Havoc Pennington <hp@pobox.com> 2000-11-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create * gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create

View File

@ -1,3 +1,10 @@
2000-20-01 Anders Carlsson <andersca@gnu.org>
* gtk/gtktogglebutton.c (gtk_toggle_button_draw): Fix bug when
a GtkToggleButton is both insensitive and active, it was being
drawn by the GtkButton draw handler which doesn't check the
state. Now it's calling gtk_toggle_button_paint instead.
2000-11-30 Havoc Pennington <hp@pobox.com> 2000-11-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create * gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create

View File

@ -1,3 +1,10 @@
2000-20-01 Anders Carlsson <andersca@gnu.org>
* gtk/gtktogglebutton.c (gtk_toggle_button_draw): Fix bug when
a GtkToggleButton is both insensitive and active, it was being
drawn by the GtkButton draw handler which doesn't check the
state. Now it's calling gtk_toggle_button_paint instead.
2000-11-30 Havoc Pennington <hp@pobox.com> 2000-11-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create * gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create

View File

@ -1,3 +1,10 @@
2000-20-01 Anders Carlsson <andersca@gnu.org>
* gtk/gtktogglebutton.c (gtk_toggle_button_draw): Fix bug when
a GtkToggleButton is both insensitive and active, it was being
drawn by the GtkButton draw handler which doesn't check the
state. Now it's calling gtk_toggle_button_paint instead.
2000-11-30 Havoc Pennington <hp@pobox.com> 2000-11-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create * gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create

View File

@ -1,3 +1,10 @@
2000-20-01 Anders Carlsson <andersca@gnu.org>
* gtk/gtktogglebutton.c (gtk_toggle_button_draw): Fix bug when
a GtkToggleButton is both insensitive and active, it was being
drawn by the GtkButton draw handler which doesn't check the
state. Now it's calling gtk_toggle_button_paint instead.
2000-11-30 Havoc Pennington <hp@pobox.com> 2000-11-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create * gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create

View File

@ -1,3 +1,10 @@
2000-20-01 Anders Carlsson <andersca@gnu.org>
* gtk/gtktogglebutton.c (gtk_toggle_button_draw): Fix bug when
a GtkToggleButton is both insensitive and active, it was being
drawn by the GtkButton draw handler which doesn't check the
state. Now it's calling gtk_toggle_button_paint instead.
2000-11-30 Havoc Pennington <hp@pobox.com> 2000-11-30 Havoc Pennington <hp@pobox.com>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create * gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create

View File

@ -401,11 +401,22 @@ static gint
gtk_toggle_button_expose (GtkWidget *widget, gtk_toggle_button_expose (GtkWidget *widget,
GdkEventExpose *event) GdkEventExpose *event)
{ {
if (!GTK_WIDGET_NO_WINDOW (widget) && GtkBin *bin;
GTK_WIDGET_CLASS (parent_class)->expose_event) GdkEventExpose child_event;
return GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
else if (GTK_WIDGET_DRAWABLE (widget))
return FALSE; {
bin = GTK_BIN (widget);
gtk_toggle_button_paint (widget, &event->area);
child_event = *event;
if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) &&
gtk_widget_intersect (bin->child, &event->area, &child_event.area))
gtk_widget_event (bin->child, (GdkEvent*) &child_event);
}
return TRUE;
} }
static void static void