diff --git a/tryton/tryton/gui/window/view_form/view/form_gtk/many2many.py b/tryton/tryton/gui/window/view_form/view/form_gtk/many2many.py index d7ff3d53ee2..126e496d2d9 100644 --- a/tryton/tryton/gui/window/view_form/view/form_gtk/many2many.py +++ b/tryton/tryton/gui/window/view_form/view/form_gtk/many2many.py @@ -35,6 +35,9 @@ def __init__(self, view, attrs): hbox = Gtk.HBox(homogeneous=False, spacing=0) hbox.set_border_width(2) + self.title = Gtk.Label( + label=set_underline(attrs.get('string', '')), + use_underline=True, halign=Gtk.Align.START) if not attrs.get('expand_toolbar'): if attrs.get('collapse_body'): click_catcher = Gtk.EventBox.new() @@ -42,9 +45,6 @@ def __init__(self, view, attrs): click_catcher.connect('button-press-event', self._toggle_body) collapse_hbox = Gtk.HBox() - self.title = Gtk.Label( - label=set_underline(attrs.get('string', '')), - use_underline=True, halign=Gtk.Align.START) self.title_expander = Gtk.Image() self.title_expander.set_from_pixbuf( common.IconFactory.get_pixbuf('tryton-arrow-down')) @@ -58,9 +58,6 @@ def __init__(self, view, attrs): hbox.pack_start( click_catcher, expand=True, fill=True, padding=0) else: - self.title = Gtk.Label( - label=set_underline(attrs.get('string', '')), - use_underline=True, halign=Gtk.Align.START) hbox.pack_start(self.title, expand=True, fill=True, padding=0) hbox.pack_start(Gtk.VSeparator(), expand=False, fill=True, padding=0) diff --git a/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py index fa3012b47d7..5d1f239d1f7 100644 --- a/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -39,6 +39,9 @@ def __init__(self, view, attrs): self.title_box = hbox = Gtk.HBox(homogeneous=False, spacing=0) hbox.set_border_width(2) + self.title = Gtk.Label( + label=set_underline(attrs.get('string', '')), + use_underline=True, halign=Gtk.Align.START) if not attrs.get('expand_toolbar'): if attrs.get('collapse_body'): click_catcher = Gtk.EventBox.new() @@ -46,9 +49,6 @@ def __init__(self, view, attrs): click_catcher.connect('button-press-event', self._toggle_body) collapse_hbox = Gtk.HBox() - self.title = Gtk.Label( - label=set_underline(attrs.get('string', '')), - use_underline=True, halign=Gtk.Align.START) self.title_expander = Gtk.Image() self.title_expander.set_from_pixbuf( common.IconFactory.get_pixbuf('tryton-arrow-down')) @@ -62,9 +62,6 @@ def __init__(self, view, attrs): hbox.pack_start( click_catcher, expand=True, fill=True, padding=0) else: - self.title = Gtk.Label( - label=set_underline(attrs.get('string', '')), - use_underline=True, halign=Gtk.Align.START) hbox.pack_start( self.title, expand=True, fill=True, padding=0)