Force a minimum height for document headers and footers

This commit is contained in:
Veronica K. B. Olsen
2020-11-21 13:10:52 +01:00
parent 562ca919e0
commit ba0658ed48
2 changed files with 28 additions and 0 deletions
+14
View File
@@ -2157,6 +2157,13 @@ class GuiDocEditHeader(QWidget):
self.outerBox.addWidget(self.closeButton, 0)
self.setLayout(self.outerBox)
# Fix Margins and Size
# This is needed for high DPI systems. See issue #499.
cM = self.mainConf.pxInt(8)
self.setContentsMargins(0, 0, 0, 0)
self.outerBox.setContentsMargins(cM, cM, cM, cM)
self.setMinimumHeight(fPx + 2*cM)
# Fix the Colours
self.matchColours()
@@ -2367,6 +2374,13 @@ class GuiDocEditFooter(QWidget):
self.outerBox.addWidget(self.wordsText)
self.setLayout(self.outerBox)
# Fix Margins and Size
# This is needed for high DPI systems. See issue #499.
cM = self.mainConf.pxInt(8)
self.setContentsMargins(0, 0, 0, 0)
self.outerBox.setContentsMargins(cM, cM, cM, cM)
self.setMinimumHeight(fPx + 2*cM)
# Fix the Colours
self.matchColours()
+14
View File
@@ -786,6 +786,13 @@ class GuiDocViewHeader(QWidget):
self.outerBox.addWidget(self.closeButton, 0)
self.setLayout(self.outerBox)
# Fix Margins and Size
# This is needed for high DPI systems. See issue #499.
cM = self.mainConf.pxInt(8)
self.setContentsMargins(0, 0, 0, 0)
self.outerBox.setContentsMargins(cM, cM, cM, cM)
self.setMinimumHeight(fPx + 2*cM)
# Fix the Colours
self.matchColours()
@@ -1036,6 +1043,13 @@ class GuiDocViewFooter(QWidget):
self.outerBox.addWidget(self.lblSynopsis, 0)
self.setLayout(self.outerBox)
# Fix Margins and Size
# This is needed for high DPI systems. See issue #499.
cM = self.mainConf.pxInt(8)
self.setContentsMargins(0, 0, 0, 0)
self.outerBox.setContentsMargins(cM, cM, cM, cM)
self.setMinimumHeight(fPx + 2*cM)
# Fix the Colours
self.matchColours()