columnviewcellwidget: Ensure for_size is large enough

When clipping, we still need to do proper size requests.
This commit is contained in:
Benjamin Otte 2023-03-30 08:51:19 +02:00
parent a29cf74e05
commit 708e067617
2 changed files with 10 additions and 0 deletions

View File

@ -108,10 +108,15 @@ gtk_column_view_cell_widget_measure (GtkWidget *widget,
{
if (fixed_width > -1)
{
int min;
if (for_size == -1)
for_size = unadj_width;
else
for_size = MIN (for_size, unadj_width);
gtk_widget_measure (child, GTK_ORIENTATION_HORIZONTAL, -1, &min, NULL, NULL, NULL);
for_size = MAX (for_size, min);
}
}

View File

@ -90,10 +90,15 @@ gtk_column_view_title_measure (GtkWidget *widget,
{
if (fixed_width > -1)
{
int min;
if (for_size == -1)
for_size = unadj_width;
else
for_size = MIN (for_size, unadj_width);
gtk_widget_measure (child, GTK_ORIENTATION_HORIZONTAL, -1, &min, NULL, NULL, NULL);
for_size = MAX (for_size, min);
}
}