diff --git a/CHANGELOG.md b/CHANGELOG.md index 62dc1cf..fadcc5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ * Make it possible to delete revisions * Make it possible to force-lock the screen even if idle timer hasn't tripped * Add shortcuts for lock and unlock of screen - * Other misc bug fixes # 0.4.4.1 diff --git a/bouquin/statistics_dialog.py b/bouquin/statistics_dialog.py index 659f79f..4950b6a 100644 --- a/bouquin/statistics_dialog.py +++ b/bouquin/statistics_dialog.py @@ -249,7 +249,6 @@ class StatisticsDialog(QDialog): self.setWindowTitle(strings._("statistics")) self.setMinimumWidth(600) - self.setMinimumHeight(400) root = QVBoxLayout(self) ( @@ -325,10 +324,16 @@ class StatisticsDialog(QDialog): self._revisions_by_date = revisions_by_date scroll = QScrollArea() - scroll.setWidgetResizable(True) + scroll.setWidgetResizable(False) scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self._heatmap.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) scroll.setWidget(self._heatmap) + + # ensure the scroll area is never shorter than the heatmap's preferred height + scroll.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) + scroll.setMinimumHeight(self._heatmap.minimumSizeHint().height()) + group_layout.addWidget(scroll) root.addWidget(group) @@ -339,6 +344,8 @@ class StatisticsDialog(QDialog): else: root.addWidget(QLabel(strings._("stats_no_data"))) + self.adjustSize() + # ---------- internal helpers ---------- def _apply_metric(self, metric: str) -> None: diff --git a/bouquin/version_check.py b/bouquin/version_check.py index a57e125..afbc409 100644 --- a/bouquin/version_check.py +++ b/bouquin/version_check.py @@ -144,7 +144,7 @@ class VersionChecker: QMessageBox.warning( self._parent, strings._("update"), - strings._("could_not_check_for_updates") + str(e), + strings._("could_not_check_for_updates") + e, ) return @@ -320,7 +320,7 @@ class VersionChecker: QMessageBox.critical( self._parent, strings._("update"), - strings._("failed_to_download_update") + str(e), + strings._("failed_to_download_update") + e, ) return @@ -334,7 +334,7 @@ class VersionChecker: QMessageBox.critical( self._parent, strings._("update"), - strings._("could_not_read_bundled_gpg_public_key") + str(e), + strings._("could_not_read_bundled_gpg_public_key") + e, ) # On failure, delete the downloaded files for safety for p in (appimage_path, sig_path): diff --git a/pyproject.toml b/pyproject.toml index 7e95f82..e22d6aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bouquin" -version = "0.4.5" +version = "0.4.4.1" description = "Bouquin is a simple, opinionated notebook application written in Python, PyQt and SQLCipher." authors = ["Miguel Jacq "] readme = "README.md"