Improve report height. Maybe

This commit is contained in:
Fabian 2021-11-26 23:41:04 +01:00
parent 41299784e7
commit 1ee3471e4c

View File

@ -130,8 +130,12 @@ class Report(QtWidgets.QDialog):
self.tableWidget.resizeColumnToContents(0)
if self.tableWidget.rowCount() > 4:
self.tableWidget.setMinimumHeight(min((self.tableWidget.rowCount() + 2) * self.tableWidget.rowHeight(0),
get_screen_height(self.tableWidget) * 0.8))
self.tableWidget.setMinimumHeight(
min(
(self.tableWidget.rowCount()) * self.tableWidget.rowHeight(0) + self.header.height() + 4,
get_screen_height(self.tableWidget) * 0.8
)
)
def update_prev_next(self):
prev, _next = self._report.prev_next_avail()