[gtk+/combo-refactor: 24/49] Fixed GtkCellView to always allocate when in fit-model mode.



commit 24d77dfd010a61fd27645d2a3a8a0b003794f370
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Wed Nov 24 18:27:51 2010 +0900

    Fixed GtkCellView to always allocate when in fit-model mode.

 gtk/gtkcellview.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index e2c8bed..419f7c3 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]