]> Pileus Git - ~andy/gtk/commitdiff
Fixed GtkCellView to always allocate when in fit-model mode.
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Wed, 24 Nov 2010 09:27:51 +0000 (18:27 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Tue, 4 Jan 2011 14:37:08 +0000 (23:37 +0900)
gtk/gtkcellview.c

index 7cb39e99659285bcecc788cb35fc35a76680d806..3c31d9aa63a8154a5d52f8cd19558b2273d44d56 100644 (file)
@@ -516,8 +516,12 @@ gtk_cell_view_size_allocate (GtkWidget     *widget,
   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 
-   * (or the cellview has its own context and is not grouped with any other cell views) */
-  if (alloc_width <= 0 && alloc_height <= 0)
+   * (or the cellview has its own context and is not grouped with any other cell views) 
+   *
+   * 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_height (priv->context, allocation->height);