sizerequest: Add more assertions for baselines
min baselines must be <= natural baselines and both must lie inside the content size of the widget.
This commit is contained in:
committed by
Matthias Clasen
parent
cef4df1e7e
commit
6a7d903612
@@ -305,6 +305,18 @@ gtk_widget_query_size_for_orientation (GtkWidget *widget,
|
||||
min_baseline = -1;
|
||||
nat_baseline = -1;
|
||||
}
|
||||
else if (min_baseline > reported_min_size ||
|
||||
nat_baseline > reported_nat_size ||
|
||||
min_baseline < 0 ||
|
||||
nat_baseline < 0)
|
||||
{
|
||||
g_warning ("%s %p reported baselines of minimum %d and natural %d, but sizes of "
|
||||
"minimum %d and natural %d. Baselines must be inside the widget size.",
|
||||
G_OBJECT_TYPE_NAME (widget), widget, min_baseline, nat_baseline,
|
||||
reported_min_size, reported_nat_size);
|
||||
min_baseline = -1;
|
||||
nat_baseline = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (css_min_size > reported_min_size)
|
||||
|
||||
Reference in New Issue
Block a user