Browse Source

Fix for claudia not starting (#341)

* Fix for claudia not starting

* converting self.fFakeWidth and self.fFakeHeight to integers
tags/v0.9.2
Aaron Clark GitHub 3 months ago
parent
commit
56b078f660
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/canvaspreviewframe.py

+ 5
- 5
src/canvaspreviewframe.py View File

@@ -56,8 +56,8 @@ class CanvasPreviewFrame(QFrame):
self.fScale = 1.0
self.fScene = None
self.fRealParent = None
self.fFakeWidth = 0.0
self.fFakeHeight = 0.0
self.fFakeWidth = 0
self.fFakeHeight = 0

self.fRenderSource = self.getRenderSource()
self.fRenderTarget = QRectF(0, 0, 0, 0)
@@ -70,8 +70,8 @@ class CanvasPreviewFrame(QFrame):
padding = 6

self.fScene = scene
self.fFakeWidth = float(realWidth) / 15
self.fFakeHeight = float(realHeight) / 15
self.fFakeWidth = int(realWidth / 15)
self.fFakeHeight = int(realHeight / 15)

self.setMinimumSize(self.fFakeWidth+padding, self.fFakeHeight+padding)
self.setMaximumSize(self.fFakeWidth*4+padding, self.fFakeHeight+padding)
@@ -198,7 +198,7 @@ class CanvasPreviewFrame(QFrame):

painter.setBrush(self.fViewBrush)
painter.setPen(self.fViewPen)
painter.drawRect(self.fViewRect[iX], self.fViewRect[iY], maxWidth, maxHeight)
painter.drawRect(QRectF(self.fViewRect[iX], self.fViewRect[iY], maxWidth, maxHeight))

if self.fUseCustomPaint:
event.accept()


Loading…
Cancel
Save