mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 17:54:15 +02:00
[view] improvement: manage window minimum width related to the table columns
This commit is contained in:
@@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
- UI
|
- UI
|
||||||
- using pre-defined sizes for the main window (percentages do not work well with the current UI)
|
- manage window minimum width related to the table columns
|
||||||
- table columns width for maximized window
|
- table columns width for maximized window
|
||||||
|
|
||||||
## [0.10.2] 2022-04-16
|
## [0.10.2] 2022-04-16
|
||||||
|
|||||||
@@ -811,6 +811,9 @@ class ManageWindow(QWidget):
|
|||||||
self._show_console_checkbox_if_output()
|
self._show_console_checkbox_if_output()
|
||||||
self._update_installed_filter()
|
self._update_installed_filter()
|
||||||
self.begin_apply_filters()
|
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()
|
notify_tray()
|
||||||
else:
|
else:
|
||||||
self._show_console_errors()
|
self._show_console_errors()
|
||||||
@@ -1127,9 +1130,11 @@ class ManageWindow(QWidget):
|
|||||||
|
|
||||||
new_width = max(table_width, toolbar_width, topbar_width)
|
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 *= 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():
|
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):
|
def set_progress_controll(self, enabled: bool):
|
||||||
self.progress_controll_enabled = enabled
|
self.progress_controll_enabled = enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user