Set the label widget's state to prelight if we're prelit. Fixes bug

2004-03-03  Mark McLoughlin  <mark@skynet.ie>

        * gtk/gtkexpander.c:
        (gtk_expander_enter_notify), (gtk_expander_leave_notify),
        (gtk_expander_set_label_widget): Set the label widget's
        state to prelight if we're prelit. Fixes bug #136078.
This commit is contained in:
Mark McLoughlin 2004-03-03 17:08:54 +00:00 committed by Mark McLoughlin
parent a796feb4b4
commit 3c8e60e7f1
6 changed files with 51 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2004-03-03 Mark McLoughlin <mark@skynet.ie>
* gtk/gtkexpander.c:
(gtk_expander_enter_notify), (gtk_expander_leave_notify),
(gtk_expander_set_label_widget): Set the label widget's
state to prelight if we're prelit. Fixes bug #136078.
2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed

View File

@ -1,3 +1,10 @@
2004-03-03 Mark McLoughlin <mark@skynet.ie>
* gtk/gtkexpander.c:
(gtk_expander_enter_notify), (gtk_expander_leave_notify),
(gtk_expander_set_label_widget): Set the label widget's
state to prelight if we're prelit. Fixes bug #136078.
2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed

View File

@ -1,3 +1,10 @@
2004-03-03 Mark McLoughlin <mark@skynet.ie>
* gtk/gtkexpander.c:
(gtk_expander_enter_notify), (gtk_expander_leave_notify),
(gtk_expander_set_label_widget): Set the label widget's
state to prelight if we're prelit. Fixes bug #136078.
2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed

View File

@ -1,3 +1,10 @@
2004-03-03 Mark McLoughlin <mark@skynet.ie>
* gtk/gtkexpander.c:
(gtk_expander_enter_notify), (gtk_expander_leave_notify),
(gtk_expander_set_label_widget): Set the label widget's
state to prelight if we're prelit. Fixes bug #136078.
2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed

View File

@ -1,3 +1,10 @@
2004-03-03 Mark McLoughlin <mark@skynet.ie>
* gtk/gtkexpander.c:
(gtk_expander_enter_notify), (gtk_expander_leave_notify),
(gtk_expander_set_label_widget): Set the label widget's
state to prelight if we're prelit. Fixes bug #136078.
2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed

View File

@ -930,6 +930,10 @@ gtk_expander_enter_notify (GtkWidget *widget,
event->detail != GDK_NOTIFY_INFERIOR)
{
expander->priv->prelight = TRUE;
if (expander->priv->label_widget)
gtk_widget_set_state (expander->priv->label_widget, GTK_STATE_PRELIGHT);
gtk_expander_redraw_expander (expander);
}
@ -949,6 +953,10 @@ gtk_expander_leave_notify (GtkWidget *widget,
event->detail != GDK_NOTIFY_INFERIOR)
{
expander->priv->prelight = FALSE;
if (expander->priv->label_widget)
gtk_widget_set_state (expander->priv->label_widget, GTK_STATE_NORMAL);
gtk_expander_redraw_expander (expander);
}
@ -1579,14 +1587,21 @@ gtk_expander_set_label_widget (GtkExpander *expander,
return;
if (priv->label_widget)
gtk_widget_unparent (priv->label_widget);
{
gtk_widget_set_state (priv->label_widget, GTK_STATE_NORMAL);
gtk_widget_unparent (priv->label_widget);
}
priv->label_widget = label_widget;
if (label_widget)
{
priv->label_widget = label_widget;
gtk_widget_set_parent (label_widget, GTK_WIDGET (expander));
if (priv->prelight)
gtk_widget_set_state (label_widget, GTK_STATE_PRELIGHT);
}
if (GTK_WIDGET_VISIBLE (expander))