[gtk+] treeview: Fix RTL column header allocation
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Fix RTL column header allocation
- Date: Sun, 12 Nov 2017 04:48:11 +0000 (UTC)
commit 5db1aa54010843b4cbe5cd0970c62e73d37216b4
Author: Benjamin Otte <otte redhat com>
Date: Sun Nov 12 05:37:06 2017 +0100
treeview: Fix RTL column header allocation
gtk/gtktreeview.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index fc3da3b..8ccdff2 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2468,9 +2468,9 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget)
tree_view->priv->last_number_of_expand_columns = number_of_expand_columns;
}
- for (list = (rtl ? last_column : first_column);
- list != (rtl ? first_column->prev : last_column->next);
- list = (rtl ? list->prev : list->next))
+ for (list = first_column;
+ list != last_column->next;
+ list = list->next)
{
gint column_width;
@@ -2508,7 +2508,10 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget)
if (extra_for_last > 0 && list == last_column)
column_width += extra_for_last;
- _gtk_tree_view_column_allocate (column, width, column_width);
+ if (rtl)
+ _gtk_tree_view_column_allocate (column, widget_width - width - column_width, column_width);
+ else
+ _gtk_tree_view_column_allocate (column, width, column_width);
width += column_width;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]