6871: workaround gtk RTL bug in MultiTreeView
optimizing cleanup - reapply from gramps40 svn: r22891
This commit is contained in:
parent
02d8a8d915
commit
29c7564ea4
@ -45,6 +45,7 @@ class MultiTreeView(Gtk.TreeView):
|
|||||||
self.connect('key_press_event', self.key_press_event)
|
self.connect('key_press_event', self.key_press_event)
|
||||||
self.defer_select = False
|
self.defer_select = False
|
||||||
|
|
||||||
|
if (Gtk.get_major_version(), Gtk.get_minor_version()) < (3, 8):
|
||||||
__grid_lines_remove_vertical = {
|
__grid_lines_remove_vertical = {
|
||||||
Gtk.TreeViewGridLines.NONE : Gtk.TreeViewGridLines.NONE,
|
Gtk.TreeViewGridLines.NONE : Gtk.TreeViewGridLines.NONE,
|
||||||
Gtk.TreeViewGridLines.HORIZONTAL : Gtk.TreeViewGridLines.HORIZONTAL,
|
Gtk.TreeViewGridLines.HORIZONTAL : Gtk.TreeViewGridLines.HORIZONTAL,
|
||||||
@ -52,8 +53,7 @@ class MultiTreeView(Gtk.TreeView):
|
|||||||
Gtk.TreeViewGridLines.BOTH : Gtk.TreeViewGridLines.HORIZONTAL
|
Gtk.TreeViewGridLines.BOTH : Gtk.TreeViewGridLines.HORIZONTAL
|
||||||
}
|
}
|
||||||
def set_grid_lines(self, grid_lines):
|
def set_grid_lines(self, grid_lines):
|
||||||
if (self.get_direction() == Gtk.TextDirection.RTL and
|
if self.get_direction() == Gtk.TextDirection.RTL:
|
||||||
(Gtk.get_major_version(), Gtk.get_minor_version()) < (3, 8)):
|
|
||||||
# Work around a gtk RTL bug, see #6871
|
# Work around a gtk RTL bug, see #6871
|
||||||
grid_lines = MultiTreeView.__grid_lines_remove_vertical[grid_lines]
|
grid_lines = MultiTreeView.__grid_lines_remove_vertical[grid_lines]
|
||||||
super(MultiTreeView, self).set_grid_lines(grid_lines)
|
super(MultiTreeView, self).set_grid_lines(grid_lines)
|
||||||
|
Loading…
Reference in New Issue
Block a user