Commit f9a8f547 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Give GtkToolButton the same treatment.

2006-06-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbutton.c (gtk_tool_button_style_set): Give
	GtkToolButton the same treatment.
parent 8dbad5b4
2006-06-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktoolbutton.c (gtk_tool_button_style_set): Give
GtkToolButton the same treatment.
* gtk/gtkbutton.c (gtk_button_style_set): Don't call
construct_child here, since some apps make assumptions
about the lifecycle of the constructed label.
......
2006-06-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktoolbutton.c (gtk_tool_button_style_set): Give
GtkToolButton the same treatment.
* gtk/gtkbutton.c (gtk_button_style_set): Don't call
construct_child here, since some apps make assumptions
about the lifecycle of the constructed label.
......
......@@ -665,11 +665,27 @@ gtk_tool_button_toolbar_reconfigured (GtkToolItem *tool_item)
gtk_tool_button_construct_contents (tool_item);
}
static void
gtk_tool_button_update_icon_spacing (GtkToolButton *button)
{
GtkWidget *box;
guint spacing;
box = GTK_BIN (button->priv->button)->child;
if (GTK_IS_BOX (box))
{
gtk_widget_style_get (GTK_WIDGET (button),
"icon-spacing", &spacing,
NULL);
gtk_box_set_spacing (GTK_BOX (box), spacing);
}
}
static void
gtk_tool_button_style_set (GtkWidget *widget,
GtkStyle *prev_style)
{
gtk_tool_button_construct_contents (GTK_TOOL_ITEM (widget));
gtk_tool_button_update_icon_spacing (GTK_TOOL_BUTTON (widget));
}
/**
......
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