forked from AuroraMiddleware/gtk
constraintlayout: Fix parsing of constant constraints
We were inadvertently turning constant constraints into constraints against super, due to confusion between target and source attribute.
This commit is contained in:
parent
de461712a1
commit
76b8676955
@ -1431,18 +1431,18 @@ constraint_data_to_constraint (const ConstraintData *data,
|
||||
else
|
||||
strength = GTK_CONSTRAINT_STRENGTH_REQUIRED;
|
||||
|
||||
if (source != NULL && source_attr != GTK_CONSTRAINT_ATTRIBUTE_NONE)
|
||||
if (source == NULL && source_attr == GTK_CONSTRAINT_ATTRIBUTE_NONE)
|
||||
return gtk_constraint_new_constant (target, target_attr,
|
||||
relation,
|
||||
data->constant,
|
||||
strength);
|
||||
else
|
||||
return gtk_constraint_new (target, target_attr,
|
||||
relation,
|
||||
source, source_attr,
|
||||
data->multiplier,
|
||||
data->constant,
|
||||
strength);
|
||||
|
||||
return gtk_constraint_new_constant (target, target_attr,
|
||||
relation,
|
||||
data->constant,
|
||||
strength);
|
||||
}
|
||||
|
||||
static GtkConstraintGuide *
|
||||
|
Loading…
Reference in New Issue
Block a user