diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index 8759d86e..522177fd 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -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() diff --git a/nw/gui/docviewer.py b/nw/gui/docviewer.py index f6ba0223..e74e7ada 100644 --- a/nw/gui/docviewer.py +++ b/nw/gui/docviewer.py @@ -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()