Skip to content

Commit

Permalink
[ui] improvement -> not displaying the number of packages when none i…
Browse files Browse the repository at this point in the history
…s displayed / available
  • Loading branch information
vinifmor committed Jan 19, 2021
1 parent 67304e8 commit 2f0b2dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- saving settings time (=~ -11%)
- internet checking time (=~ -58%)
- UI
- not displaying the number of packages when none is displayed / available
- minor improvements

### Fixes
Expand Down
6 changes: 5 additions & 1 deletion bauh/view/qt/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,11 @@ def _update_table(self, pkgs_info: dict, signal: bool = False):
self.table_apps.change_headers_policy(QHeaderView.Stretch)
self.table_apps.change_headers_policy()
self._resize(accept_lower_width=len(self.pkgs) > 0)
self.label_displayed.setText('{} / {}'.format(len(self.pkgs), len(self.pkgs_available)))

if len(self.pkgs) == 0 and len(self.pkgs_available) == 0:
self.label_displayed.setText('')
else:
self.label_displayed.setText('{} / {}'.format(len(self.pkgs), len(self.pkgs_available)))
else:
self.label_displayed.hide()

Expand Down

0 comments on commit 2f0b2dd

Please sign in to comment.