From f9ba99014269b874026a91dfee56bed38990526a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 30 Jul 2025 00:57:42 +0900 Subject: [PATCH] fix: set expand properties of columns --- helpers/ui.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/helpers/ui.py b/helpers/ui.py index 75edd9a..a643b32 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -2939,6 +2939,7 @@ class DetailsDialog(GenericDialog): enable_search=False, search_column=-1, headers_visible=False, + fixed_height_mode=True ) self.view.connect("row-activated", self._on_row_activated) @@ -2954,6 +2955,7 @@ class DetailsDialog(GenericDialog): if i != 2: self.view.append_column(column) column.set_sort_column_id(i) + column.set_expand(True) scrollable_tree = Gtk.ScrolledWindow() scrollable_tree.add(self.view) @@ -3025,18 +3027,25 @@ class ModDialog(GenericDialog): self.set_size_request(800, 500) self.scrollable = Gtk.ScrolledWindow() - self.view = Gtk.TreeView(enable_search=False, search_column=-1) + self.view = Gtk.TreeView( + enable_search=False, + search_column=-1, + fixed_height_mode=True + ) self.scrollable.add(self.view) set_surrounding_margins(self.scrollable, 20) self.view.connect("row-activated", self._on_row_activated) for i, column_title in enumerate(["Mod", "ID", "Installed"]): - renderer = Gtk.CellRendererText() + renderer = Gtk.CellRendererText( + ellipsize=Pango.EllipsizeMode.END + ) column = Gtk.TreeViewColumn(column_title, renderer, text=i) column.set_sizing(Gtk.TreeViewColumnSizing.FIXED) self.view.append_column(column) column.set_sort_column_id(i) + column.set_fixed_width(350) dialogBox.pack_end(self.scrollable, True, True, 0) wait_dialog = GenericDialog("Fetching modlist", Popup.WAIT)