From ffff3aba43422ccb74ead3b288bbf1935f7e52ac Mon Sep 17 00:00:00 2001 From: Blaine Date: Thu, 11 Jun 2020 21:53:05 +0530 Subject: restore scroll bars on side View --- src/main/python/utils/canvas.py | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/main/python/utils/canvas.py') diff --git a/src/main/python/utils/canvas.py b/src/main/python/utils/canvas.py index 3c7ac67..fd06fb7 100644 --- a/src/main/python/utils/canvas.py +++ b/src/main/python/utils/canvas.py @@ -32,12 +32,6 @@ class canvas(customView): self.painter = customScene() self.painter.setBackgroundBrush(QBrush(Qt.white)) #set white background self.setScene = self.painter - # self = customView(self.painter, self) #create a viewport for the canvas board - - # self.layout = QHBoxLayout(self) #create the layout of the canvas, the canvas could just subclass QGView instead - # self.layout.addWidget(self, alignment=Qt.AlignCenter) - # self.layout.setContentsMargins(0, 0, 0, 0) - # self.setLayout(self.layout) #set initial paper size for the scene self.painter.setSceneRect(0, 0, *paperSizes[self._canvasSize][self._ppi]) @@ -55,21 +49,6 @@ class canvas(customView): #update view size self.setSceneRect(0, 0, width - frameWidth*2, height) - # use the available mdi area, also add padding - prect = self.parentMdiArea.rect() - width = width - height = height - - # add scrollbar size to width and height if they are visible, avoids clipping - if self.verticalScrollBar().isVisible(): - width += self.style().pixelMetric(QStyle.PM_ScrollBarExtent) - if self.horizontalScrollBar().isVisible(): - height += self.style().pixelMetric(QStyle.PM_ScrollBarExtent) - - #if view is visible use half of available width - #use minimum width required to fit the view - #set view dims - def resizeEvent(self, event): #overloaded function to also view size on window update self.adjustView() -- cgit