[gtk+/combo-refactor: 24/42] Fixed GtkCellView to always allocate when in fit-model mode.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/combo-refactor: 24/42] Fixed GtkCellView to always allocate when in fit-model mode.
- Date: Mon, 29 Nov 2010 05:54:33 +0000 (UTC)
commit 2f3c4274e2abc1d08946ef8edad5316de7848b2a
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]