mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 16:50:11 +00:00
Fixed GtkCellView to always allocate when in fit-model mode.
This commit is contained in:
parent
83c69f4cf3
commit
39cf1576d7
@ -516,8 +516,12 @@ gtk_cell_view_size_allocate (GtkWidget *widget,
|
|||||||
gtk_cell_area_context_get_allocation (priv->context, &alloc_width, &alloc_height);
|
gtk_cell_area_context_get_allocation (priv->context, &alloc_width, &alloc_height);
|
||||||
|
|
||||||
/* The first cell view in context is responsible for allocating the context at allocate time
|
/* The first cell view in context is responsible for allocating the context at allocate time
|
||||||
* (or the cellview has its own context and is not grouped with any other cell views) */
|
* (or the cellview has its own context and is not grouped with any other cell views)
|
||||||
if (alloc_width <= 0 && alloc_height <= 0)
|
*
|
||||||
|
* If the cellview is in "fit model" mode, we assume its not in context and needs to
|
||||||
|
* allocate every time.
|
||||||
|
*/
|
||||||
|
if ((alloc_width <= 0 && alloc_height <= 0) || priv->fit_model)
|
||||||
{
|
{
|
||||||
gtk_cell_area_context_allocate_width (priv->context, allocation->width);
|
gtk_cell_area_context_allocate_width (priv->context, allocation->width);
|
||||||
gtk_cell_area_context_allocate_height (priv->context, allocation->height);
|
gtk_cell_area_context_allocate_height (priv->context, allocation->height);
|
||||||
|
Loading…
Reference in New Issue
Block a user