Revert "More tweaks to statistics dialog size"
This reverts commit 4ec8c64994.
This commit is contained in:
parent
32bf2e1187
commit
632cdf5176
1 changed files with 2 additions and 9 deletions
|
|
@ -249,6 +249,7 @@ class StatisticsDialog(QDialog):
|
||||||
|
|
||||||
self.setWindowTitle(strings._("statistics"))
|
self.setWindowTitle(strings._("statistics"))
|
||||||
self.setMinimumWidth(600)
|
self.setMinimumWidth(600)
|
||||||
|
self.setMinimumHeight(350)
|
||||||
root = QVBoxLayout(self)
|
root = QVBoxLayout(self)
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
@ -324,16 +325,10 @@ class StatisticsDialog(QDialog):
|
||||||
self._revisions_by_date = revisions_by_date
|
self._revisions_by_date = revisions_by_date
|
||||||
|
|
||||||
scroll = QScrollArea()
|
scroll = QScrollArea()
|
||||||
scroll.setWidgetResizable(False)
|
scroll.setWidgetResizable(True)
|
||||||
scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
|
scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
|
||||||
scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||||
self._heatmap.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
|
|
||||||
scroll.setWidget(self._heatmap)
|
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)
|
group_layout.addWidget(scroll)
|
||||||
|
|
||||||
root.addWidget(group)
|
root.addWidget(group)
|
||||||
|
|
@ -344,8 +339,6 @@ class StatisticsDialog(QDialog):
|
||||||
else:
|
else:
|
||||||
root.addWidget(QLabel(strings._("stats_no_data")))
|
root.addWidget(QLabel(strings._("stats_no_data")))
|
||||||
|
|
||||||
self.adjustSize()
|
|
||||||
|
|
||||||
# ---------- internal helpers ----------
|
# ---------- internal helpers ----------
|
||||||
|
|
||||||
def _apply_metric(self, metric: str) -> None:
|
def _apply_metric(self, metric: str) -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue