[gtk+/gtk-3-4] iconview: Include column spacing in calculation
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-4] iconview: Include column spacing in calculation
- Date: Tue, 19 Jun 2012 12:29:56 +0000 (UTC)
commit cb190f7d2ab958774010f066bc7f076bd1e4fcc2
Author: Benjamin Otte <otte redhat com>
Date: Wed Jun 13 04:56:22 2012 +0200
iconview: Include column spacing in calculation
The function is probably almost never used, so nobody has ever seen this
bug, but we should still get it right.
https://bugzilla.gnome.org/show_bug.cgi?id=677809
gtk/gtkiconview.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index cb74190..e918271 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1675,8 +1675,8 @@ gtk_icon_view_get_preferred_width_for_height (GtkWidget *widget,
n_items = gtk_icon_view_get_n_items (icon_view);
gtk_icon_view_get_preferred_item_size (icon_view, GTK_ORIENTATION_HORIZONTAL, row_height, &item_min, &item_nat);
- *minimum = item_min * ((n_items + rows - 1) / rows);
- *natural = item_nat * ((n_items + rows - 1) / rows);
+ *minimum = (item_min + priv->column_spacing) * ((n_items + rows - 1) / rows) - priv->column_spacing;
+ *natural = (item_nat + priv->column_spacing) * ((n_items + rows - 1) / rows) - priv->column_spacing;
*minimum += 2 * priv->margin;
*natural += 2 * priv->margin;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]