Browse Source

remove debug print statements and make bg grey

master
Ivan Holmes 2 years ago
parent
commit
70e2d4e7d3
  1. 9
      csgui/pdfViewer.py
  2. 2
      gui.py

9
csgui/pdfViewer.py

@ -28,10 +28,10 @@ class PDFLabel(QLabel):
parentMargins[0]*2 + scrollBarWidth parentMargins[0]*2 + scrollBarWidth
idealWidth = self.parent.width() - totalMargin idealWidth = self.parent.width() - totalMargin
print(idealWidth)
# print(idealWidth)
pixSize = self.pixmap().size() pixSize = self.pixmap().size()
print(pixSize)
print((self.parent.scrollAreaContents.size()))
# print(pixSize)
# print((self.parent.scrollAreaContents.size()))
pixSize.scale(idealWidth, 1000000, Qt.KeepAspectRatio) pixSize.scale(idealWidth, 1000000, Qt.KeepAspectRatio)
@ -48,6 +48,9 @@ class PDFViewer(QScrollArea):
self.setWidget(self.scrollAreaContents) self.setWidget(self.scrollAreaContents)
self.setWidgetResizable(True) self.setWidgetResizable(True)
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) 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.scrollAreaContents.setLayout(self.scrollAreaLayout)
self.pixmapList = [] self.pixmapList = []

2
gui.py

@ -383,7 +383,7 @@ class MainWindow(QMainWindow):
qFontReal = QRawFont.fromFont(qFont) qFontReal = QRawFont.fromFont(qFont)
#fontInfo = QFontInfo(qFont) #fontInfo = QFontInfo(qFont)
#qFontReal = QRawFont(fontInfo.family()) #qFontReal = QRawFont(fontInfo.family())
print(qFont.rawName())
#print(qFont.rawName())
def autoUpdateEnabledAction(self, state): def autoUpdateEnabledAction(self, state):
self.previeww.widget().updatePreviewButton.setEnabled(not state) self.previeww.widget().updatePreviewButton.setEnabled(not state)

Loading…
Cancel
Save