From 95b8406c7b97aab170d127b466ff506b724def3c Mon Sep 17 00:00:00 2001 From: glubsy Date: Wed, 15 Jul 2020 04:14:24 +0200 Subject: [PATCH] Fix scrollbar displayed while splitter maxed out * For some reason the table's height is a few pixel longer on Windows so we work around the issue by adding a small offset to the maximum height hint. * No idea about MacOS yet but this might need the same treatment. --- qt/pe/details_dialog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt/pe/details_dialog.py b/qt/pe/details_dialog.py index 07ecdfcb..7dcf0cd9 100644 --- a/qt/pe/details_dialog.py +++ b/qt/pe/details_dialog.py @@ -9,6 +9,7 @@ from PyQt5.QtWidgets import ( QAbstractItemView, QSizePolicy, QGridLayout, QSplitter, QFrame) from hscommon.trans import trget +from hscommon.plat import ISWINDOWS from ..details_dialog import DetailsDialog as DetailsDialogBase from ..details_table import DetailsTable from .image_viewer import ( @@ -117,7 +118,9 @@ class DetailsDialog(DetailsDialogBase): self.tableView.setMaximumHeight( self.tableView.rowHeight(1) * self.tableModel.model.row_count() - + self.tableView.verticalHeader().sectionSize(0)) + + self.tableView.verticalHeader().sectionSize(0) + # Windows seems to add a few pixels more to the table somehow + + 5 if ISWINDOWS else 0) DetailsDialogBase.show(self) self._update()