Add fallback for bug observed on debian 10.
This commit is contained in:
parent
8eba8ac60e
commit
f38fed4f18
@ -98,8 +98,13 @@ class Report(QtWidgets.QDialog):
|
|||||||
self.tableWidget.setMinimumWidth(min_width * 1.33)
|
self.tableWidget.setMinimumWidth(min_width * 1.33)
|
||||||
self.header.setSectionResizeMode(QtWidgets.QHeaderView.Stretch)
|
self.header.setSectionResizeMode(QtWidgets.QHeaderView.Stretch)
|
||||||
if self.tableWidget.rowCount() > 4:
|
if self.tableWidget.rowCount() > 4:
|
||||||
|
if hasattr(self.tableWidget, "screen"):
|
||||||
|
screen_height = self.tableWidget.screen().size().height()
|
||||||
|
else:
|
||||||
|
print("unable to detect screen height falling back to default value of 1080")
|
||||||
|
screen_height = 1080
|
||||||
self.tableWidget.setMinimumHeight(min((self.tableWidget.rowCount() + 2) * self.tableWidget.rowHeight(0),
|
self.tableWidget.setMinimumHeight(min((self.tableWidget.rowCount() + 2) * self.tableWidget.rowHeight(0),
|
||||||
self.tableWidget.screen().size().height() * 0.8))
|
screen_height * 0.8))
|
||||||
|
|
||||||
def update_prev_next(self):
|
def update_prev_next(self):
|
||||||
prev, _next = self._report.prev_next_avail()
|
prev, _next = self._report.prev_next_avail()
|
||||||
|
Loading…
Reference in New Issue
Block a user