summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/python/utils/canvas.py21
-rw-r--r--src/main/python/utils/fileWindow.py2
2 files changed, 1 insertions, 22 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()
diff --git a/src/main/python/utils/fileWindow.py b/src/main/python/utils/fileWindow.py
index 01710fb..2ef68c6 100644
--- a/src/main/python/utils/fileWindow.py
+++ b/src/main/python/utils/fileWindow.py
@@ -83,7 +83,7 @@ class fileWindow(QMdiSubWindow):
width = parentRect.width()
height = parentRect.height()
self.moveSideViewCloseButton()
- self.sideView.setSceneRect(0, 0, self.size().width()//2 - self.sideView.frameWidth(), self.size().height()//2)
+ self.sideView.resize(self.size().width()//2 - self.sideView.frameWidth(), self.size().height())
else:
width = min(parentRect.width(), width + 100)