From 70e2d4e7d35d91091a5b5fef2c2d29e633b6d639 Mon Sep 17 00:00:00 2001 From: Ivan Holmes Date: Sat, 12 Nov 2022 15:25:16 +0000 Subject: [PATCH] remove debug print statements and make bg grey --- csgui/pdfViewer.py | 9 ++++++--- gui.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/csgui/pdfViewer.py b/csgui/pdfViewer.py index 7a29928..d380beb 100644 --- a/csgui/pdfViewer.py +++ b/csgui/pdfViewer.py @@ -28,10 +28,10 @@ class PDFLabel(QLabel): parentMargins[0]*2 + scrollBarWidth idealWidth = self.parent.width() - totalMargin - print(idealWidth) + # print(idealWidth) pixSize = self.pixmap().size() - print(pixSize) - print((self.parent.scrollAreaContents.size())) + # print(pixSize) + # print((self.parent.scrollAreaContents.size())) pixSize.scale(idealWidth, 1000000, Qt.KeepAspectRatio) @@ -48,6 +48,9 @@ class PDFViewer(QScrollArea): self.setWidget(self.scrollAreaContents) self.setWidgetResizable(True) self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + # set a fixed background colour + # on some OSes (Mac, Haiku) it is grey automatically but not on KDE + self.setStyleSheet('PDFViewer {background-color: #D8D8D8}') self.scrollAreaContents.setLayout(self.scrollAreaLayout) self.pixmapList = [] diff --git a/gui.py b/gui.py index 66fbcf0..654c62f 100755 --- a/gui.py +++ b/gui.py @@ -383,7 +383,7 @@ class MainWindow(QMainWindow): qFontReal = QRawFont.fromFont(qFont) #fontInfo = QFontInfo(qFont) #qFontReal = QRawFont(fontInfo.family()) - print(qFont.rawName()) + #print(qFont.rawName()) def autoUpdateEnabledAction(self, state): self.previeww.widget().updatePreviewButton.setEnabled(not state)