mirror of https://github.com/GNOME/gimp.git
Issue #3876 - The tool options of some transform tools are vertically centered ...
... in their dockable dialog In GimpChainButton, override GtkWidget::compute_expand() to avoid inheriting [hv]expand from the button's chain lines, so that these propeties don't in turn propagate to the widget's ancestors, screwing with their layout.
This commit is contained in:
parent
a88aa27942
commit
d93fefb174
|
@ -92,6 +92,10 @@ static void gimp_chain_button_get_property (GObject *object,
|
|||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_chain_button_compute_expand (GtkWidget *widget,
|
||||
gboolean *hexpand_p,
|
||||
gboolean *vexpand_p);
|
||||
|
||||
static void gimp_chain_button_clicked_callback (GtkWidget *widget,
|
||||
GimpChainButton *button);
|
||||
static void gimp_chain_button_update_image (GimpChainButton *button);
|
||||
|
@ -118,11 +122,14 @@ static const gchar * const gimp_chain_icon_names[] =
|
|||
static void
|
||||
gimp_chain_button_class_init (GimpChainButtonClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
object_class->constructed = gimp_chain_button_constructed;
|
||||
object_class->set_property = gimp_chain_button_set_property;
|
||||
object_class->get_property = gimp_chain_button_get_property;
|
||||
object_class->constructed = gimp_chain_button_constructed;
|
||||
object_class->set_property = gimp_chain_button_set_property;
|
||||
object_class->get_property = gimp_chain_button_get_property;
|
||||
|
||||
widget_class->compute_expand = gimp_chain_button_compute_expand;
|
||||
|
||||
gimp_chain_button_signals[TOGGLED] =
|
||||
g_signal_new ("toggled",
|
||||
|
@ -301,6 +308,16 @@ gimp_chain_button_get_property (GObject *object,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_chain_button_compute_expand (GtkWidget *widget,
|
||||
gboolean *hexpand_p,
|
||||
gboolean *vexpand_p)
|
||||
{
|
||||
/* don't inherit [hv]expand from the chain lines. see issue #3876. */
|
||||
*hexpand_p = FALSE;
|
||||
*vexpand_p = FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_chain_button_new:
|
||||
* @position: The position you are going to use for the button
|
||||
|
|
Loading…
Reference in New Issue