Commit 3c8e60e7 authored by Mark McLoughlin's avatar Mark McLoughlin Committed by Mark McLoughlin

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.
parent a796feb4
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> 2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed * gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed
......
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> 2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed * gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed
......
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> 2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed * gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed
......
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> 2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed * gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed
......
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> 2004-03-03 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed * gtk/gtkradiobutton.h, radiomenuitem.h: Corrected the group_changed
......
...@@ -930,6 +930,10 @@ gtk_expander_enter_notify (GtkWidget *widget, ...@@ -930,6 +930,10 @@ gtk_expander_enter_notify (GtkWidget *widget,
event->detail != GDK_NOTIFY_INFERIOR) event->detail != GDK_NOTIFY_INFERIOR)
{ {
expander->priv->prelight = TRUE; 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); gtk_expander_redraw_expander (expander);
} }
...@@ -949,6 +953,10 @@ gtk_expander_leave_notify (GtkWidget *widget, ...@@ -949,6 +953,10 @@ gtk_expander_leave_notify (GtkWidget *widget,
event->detail != GDK_NOTIFY_INFERIOR) event->detail != GDK_NOTIFY_INFERIOR)
{ {
expander->priv->prelight = FALSE; 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); gtk_expander_redraw_expander (expander);
} }
...@@ -1579,14 +1587,21 @@ gtk_expander_set_label_widget (GtkExpander *expander, ...@@ -1579,14 +1587,21 @@ gtk_expander_set_label_widget (GtkExpander *expander,
return; return;
if (priv->label_widget) 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; priv->label_widget = label_widget;
if (label_widget) if (label_widget)
{ {
priv->label_widget = label_widget; priv->label_widget = label_widget;
gtk_widget_set_parent (label_widget, GTK_WIDGET (expander)); 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)) if (GTK_WIDGET_VISIBLE (expander))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment