summaryrefslogtreecommitdiff
path: root/src/main/python/utils/canvas.py
diff options
context:
space:
mode:
authorBlaine2020-06-11 21:53:05 +0530
committerBlaine2020-06-11 21:53:05 +0530
commitffff3aba43422ccb74ead3b288bbf1935f7e52ac (patch)
tree16bf648b93a3ac6982774432605672cec35cfd1d /src/main/python/utils/canvas.py
parent530a2c5f1038d6ee280aaf99f47483a27ce7fbbd (diff)
downloadChemical-PFD-ffff3aba43422ccb74ead3b288bbf1935f7e52ac.tar.gz
Chemical-PFD-ffff3aba43422ccb74ead3b288bbf1935f7e52ac.tar.bz2
Chemical-PFD-ffff3aba43422ccb74ead3b288bbf1935f7e52ac.zip
restore scroll bars on side View
Diffstat (limited to 'src/main/python/utils/canvas.py')
-rw-r--r--src/main/python/utils/canvas.py21
1 files changed, 0 insertions, 21 deletions
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()