More tweaks to statistics dialog size
This commit is contained in:
parent
054ad88991
commit
4ec8c64994
1 changed files with 9 additions and 2 deletions
|
|
@ -249,7 +249,6 @@ class StatisticsDialog(QDialog):
|
|||
|
||||
self.setWindowTitle(strings._("statistics"))
|
||||
self.setMinimumWidth(600)
|
||||
self.setMinimumHeight(350)
|
||||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue