diff options
Diffstat (limited to 'src/main/python/utils/canvas.py')
-rw-r--r-- | src/main/python/utils/canvas.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/python/utils/canvas.py b/src/main/python/utils/canvas.py index 8f5f7b4..bf035f1 100644 --- a/src/main/python/utils/canvas.py +++ b/src/main/python/utils/canvas.py @@ -24,7 +24,9 @@ class canvas(QWidget): self._canvasSize = size # self.setFixedSize(parent.size()) #Create area for the graphic items to be placed, this is just here right now for the future - # when we will draw items on this, this might be changed if QGraphicScene is subclassed. + # when we will draw items on this, this might be changed if QGraphicScene is subclassed. + + #set layout and background color self.painter = QGraphicsScene() self.painter.setBackgroundBrush(QBrush(Qt.white)) #set white background @@ -34,7 +36,6 @@ class canvas(QWidget): self.layout.addWidget(self.view, alignment=Qt.AlignCenter) self.layout.setContentsMargins(0, 0, 0, 0) self.setLayout(self.layout) - #set layout and background color #set initial paper size for the scene self.painter.setSceneRect(0, 0, *paperSizes[self.canvasSize][self.ppi]) |