[view] improvement: manage window minimum width related to the table columns

This commit is contained in:
Vinicius Moreira
2022-04-18 14:31:35 -03:00
parent 2d518f891d
commit 41ac7a12e0
2 changed files with 7 additions and 2 deletions

View File

@@ -811,6 +811,9 @@ class ManageWindow(QWidget):
self._show_console_checkbox_if_output()
self._update_installed_filter()
self.begin_apply_filters()
self.table_apps.change_headers_policy(policy=QHeaderView.Stretch, maximized=self._maximized)
self.table_apps.change_headers_policy(policy=QHeaderView.ResizeToContents, maximized=self._maximized)
self._resize(accept_lower_width=True)
notify_tray()
else:
self._show_console_errors()
@@ -1127,9 +1130,11 @@ class ManageWindow(QWidget):
new_width = max(table_width, toolbar_width, topbar_width)
new_width *= 1.05 # this extra size is not because of the toolbar button, but the table upgrade buttons
new_width = int(new_width)
if (self.pkgs and accept_lower_width) or new_width > self.width():
self.resize(int(new_width), self.height())
self.resize(new_width, self.height())
self.setMinimumWidth(new_width)
def set_progress_controll(self, enabled: bool):
self.progress_controll_enabled = enabled