From 8ca5d92883041c95fbf2b5e1830b100e7bb8fb74 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Wed, 19 Jun 2013 20:29:57 +0000 Subject: [PATCH] Copied my 6812 fix port for gtk3 Integrated from gramps40 branch svn: r22525 --- gramps/plugins/view/pedigreeview.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gramps/plugins/view/pedigreeview.py b/gramps/plugins/view/pedigreeview.py index 05c2451ec..363f93f94 100644 --- a/gramps/plugins/view/pedigreeview.py +++ b/gramps/plugins/view/pedigreeview.py @@ -606,6 +606,11 @@ class PedigreeView(NavigationView): self.scrolledwindow.add_with_viewport(event_box) self.table = Gtk.Grid() + # force LTR layout of the tree, even though the text might be RTL! + # this way the horizontal scroll preferences will be correct always + if self.table.get_direction() == Gtk.TextDirection.RTL: + self.table.set_direction(Gtk.TextDirection.LTR) + self.table.set_halign(Gtk.Align.END) event_box.add(self.table) event_box.get_parent().set_shadow_type(Gtk.ShadowType.NONE) self.table.set_row_spacing(1) @@ -1101,6 +1106,10 @@ class PedigreeView(NavigationView): elif self.tree_direction == 3: child_arrow = Gtk.ArrowType.RIGHT parent_arrow = Gtk.ArrowType.LEFT + # GTK will reverse the icons for RTL locales, but we force LTR layout of the table, + # so reverse the arrows back... + if self.tree_direction in [2,3] and self.scrolledwindow.get_direction() == Gtk.TextDirection.RTL: + child_arrow, parent_arrow = parent_arrow, child_arrow button = Gtk.Button() button.add(Gtk.Arrow.new(child_arrow, Gtk.ShadowType.IN))