gtk+ r21919 - in branches/gtk-2-14: . gtk
- From: yairhr svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21919 - in branches/gtk-2-14: . gtk
- Date: Sun, 21 Dec 2008 08:20:31 +0000 (UTC)
Author: yairhr
Date: Sun Dec 21 08:20:31 2008
New Revision: 21919
URL: http://svn.gnome.org/viewvc/gtk+?rev=21919&view=rev
Log:
2008-12-21 Yair Hershkovitz <yairhr gmail com>
Bug 565203: RTL locales: icons are misplaced when horizontal
gtkiconview is contained in a gtkscrolledwindow.
* gtk/gtkiconview.c (gtk_icon_view_layout_single_row):
Fix horizontal icon positions when in RTL locale.
Modified:
branches/gtk-2-14/ChangeLog
branches/gtk-2-14/gtk/gtkiconview.c
Modified: branches/gtk-2-14/gtk/gtkiconview.c
==============================================================================
--- branches/gtk-2-14/gtk/gtkiconview.c (original)
+++ branches/gtk-2-14/gtk/gtkiconview.c Sun Dec 21 08:20:31 2008
@@ -2566,7 +2566,7 @@
current_width += icon_view->priv->column_spacing + 2 * focus_width;
item->y = *y + focus_width;
- item->x = rtl ? GTK_WIDGET (icon_view)->allocation.width - item->width - x : x;
+ item->x = x;
x = current_width - (icon_view->priv->margin + focus_width);
@@ -2590,14 +2590,17 @@
{
GtkIconViewItem *item = items->data;
+ if (rtl)
+ {
+ item->x = *maximum_width - item->width - item->x;
+ item->col = col - 1 - item->col;
+ }
+
gtk_icon_view_calculate_item_size2 (icon_view, item, max_height);
/* We may want to readjust the new y coordinate. */
if (item->y + item->height + focus_width + icon_view->priv->row_spacing > *y)
*y = item->y + item->height + focus_width + icon_view->priv->row_spacing;
-
- if (rtl)
- item->col = col - 1 - item->col;
}
g_free (max_height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]