Skip to content

Commit

Permalink
add settings to remember_columns width
Browse files Browse the repository at this point in the history
add settings to remember_columns width
  • Loading branch information
heldersepu committed May 7, 2024
1 parent 6aa904a commit f22bd61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/tribler/gui/widgets/downloadspage.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ def initialize_downloads_page(self):
connect(self.window().downloads_filter_input.textChanged, self.on_filter_text_changed)

self.window().downloads_list.header().setSortIndicator(12, Qt.AscendingOrder)
self.window().downloads_list.header().resizeSection(12, 146)
columns = self.window().gui_settings.value("remember_columns", "")
if columns == "":
self.window().downloads_list.header().resizeSection(12, 146)
else:
for kv in columns.split(","):
key, value = kv.split(":")
self.window().downloads_list.header().resizeSection(int(key), int(value))

self.background_refresh_downloads_timer.setSingleShot(True)
connect(self.background_refresh_downloads_timer.timeout, self.on_background_refresh_downloads_timer)
Expand Down

0 comments on commit f22bd61

Please sign in to comment.