Set tab length per dir title len

This commit is contained in:
itdominator 2021-11-22 21:46:01 -06:00
parent 67b209e57b
commit 710d37f01d
2 changed files with 7 additions and 3 deletions

View File

@ -115,8 +115,12 @@ class TabMixin(WidgetMixin):
if not traversed:
return
self.load_store(view, store)
self.set_path_text(wid, tid)
char_width = len(view.get_end_of_path())
tab_label.set_width_chars(char_width)
tab_label.set_label(view.get_end_of_path())
self.set_window_title()
self.set_file_watcher(view)

View File

@ -90,9 +90,9 @@ class WidgetMixin:
icon = Gtk.Image(stock=Gtk.STOCK_CLOSE)
label.set_label(f"{view.get_end_of_path()}")
label.set_width_chars(25)
label.set_max_width_chars(64)
label.set_ellipsize(2) #PANGO_ELLIPSIZE_MIDDLE
label.set_width_chars(len(view.get_end_of_path()))
label.set_xalign(0.0)
# label.set_ellipsize(2) #PANGO_ELLIPSIZE_MIDDLE
tid.set_label(f"{view.id}")
close.add(icon)