[gtk+] fix wrap width calculations that caused item height to be wrong
- From: Cody Russell <bratsche src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] fix wrap width calculations that caused item height to be wrong
- Date: Wed, 1 Jul 2009 18:24:25 +0000 (UTC)
commit 6060dab77afd288dfb6e0d2105f6ae1a2c8ed41d
Author: Cody Russell <bratsche gnome org>
Date: Wed Jul 1 13:17:51 2009 -0500
fix wrap width calculations that caused item height to be wrong
Fix by logari81 to the wrap width calculations fir GtkIconView. #490724
gtk/gtkiconview.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index afbc229..865b8d5 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -2916,17 +2916,14 @@ adjust_wrap_width (GtkIconView *icon_view,
else
item_width = item->width;
- if (item->width == -1)
- {
- if (item_width > 0)
- wrap_width = item_width - pixbuf_width - icon_view->priv->spacing;
- else
- wrap_width = MAX (2 * pixbuf_width, 50);
- }
- else if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL)
- wrap_width = item_width;
- else
- wrap_width = item_width - pixbuf_width - icon_view->priv->spacing;
+ if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL)
+ wrap_width = item_width;
+ else {
+ if (item->width == -1 && item_width <= 0)
+ wrap_width = MAX (2 * pixbuf_width, 50);
+ else
+ wrap_width = item_width - pixbuf_width - icon_view->priv->spacing;
+ }
wrap_width -= ITEM_PADDING * 2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]