[baobab] Update to the latest egg-list-box
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] Update to the latest egg-list-box
- Date: Mon, 15 Oct 2012 08:34:32 +0000 (UTC)
commit 37dce960df1c08c088ed699a34d01d5fa72122b8
Author: Paolo Borelli <pborelli gnome org>
Date: Sat Oct 13 17:56:59 2012 +0200
Update to the latest egg-list-box
Propagate the parent state when setting the child flags
src/egg-list-box.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/egg-list-box.c b/src/egg-list-box.c
index 5108597..79c43a2 100644
--- a/src/egg-list-box.c
+++ b/src/egg-list-box.c
@@ -1045,31 +1045,33 @@ egg_list_box_real_draw (GtkWidget* widget, cairo_t* cr)
EggListBoxPrivate *priv = list_box->priv;
GtkAllocation allocation = {0};
GtkStyleContext* context;
+ GtkStateFlags state;
ChildFlags flags[3], *found;
gint flags_length;
int i;
gtk_widget_get_allocation (GTK_WIDGET (list_box), &allocation);
context = gtk_widget_get_style_context (GTK_WIDGET (list_box));
+ state = gtk_widget_get_state_flags (widget);
gtk_render_background (context, cr, (gdouble) 0, (gdouble) 0, (gdouble) allocation.width, (gdouble) allocation.height);
flags_length = 0;
if (priv->selected_child != NULL)
{
found = child_flags_find_or_add (flags, &flags_length, priv->selected_child);
- found->state |= GTK_STATE_FLAG_SELECTED;
+ found->state |= (state | GTK_STATE_FLAG_SELECTED);
}
if (priv->prelight_child != NULL)
{
found = child_flags_find_or_add (flags, &flags_length, priv->prelight_child);
- found->state |= GTK_STATE_FLAG_PRELIGHT;
+ found->state |= (state | GTK_STATE_FLAG_PRELIGHT);
}
if (priv->active_child != NULL && priv->active_child_active)
{
found = child_flags_find_or_add (flags, &flags_length, priv->active_child);
- found->state |= GTK_STATE_FLAG_ACTIVE;
+ found->state |= (state | GTK_STATE_FLAG_ACTIVE);
}
for (i = 0; i < flags_length; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]