summaryrefslogtreecommitdiff
path: root/src/main/python/utils/canvas.py
diff options
context:
space:
mode:
authorBlaine2020-05-01 15:08:17 +0530
committerBlaine2020-05-01 15:08:17 +0530
commitd2dd2117a260f188cc3d0bacc2a6b863bcd973c0 (patch)
treecaa849c92d53da531cd261f78d0d55221cecba66 /src/main/python/utils/canvas.py
parent0f9e183d9f174888dd4c15922e5a038a6467afc2 (diff)
downloadChemical-PFD-d2dd2117a260f188cc3d0bacc2a6b863bcd973c0.tar.gz
Chemical-PFD-d2dd2117a260f188cc3d0bacc2a6b863bcd973c0.tar.bz2
Chemical-PFD-d2dd2117a260f188cc3d0bacc2a6b863bcd973c0.zip
hecc
Diffstat (limited to 'src/main/python/utils/canvas.py')
-rw-r--r--src/main/python/utils/canvas.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/python/utils/canvas.py b/src/main/python/utils/canvas.py
index 418a95e..2ddcc01 100644
--- a/src/main/python/utils/canvas.py
+++ b/src/main/python/utils/canvas.py
@@ -67,9 +67,9 @@ class canvas(QWidget):
if self.view.horizontalScrollBar().isVisible():
height += self.style().pixelMetric(QStyle.PM_ScrollBarExtent)
- # factor = 2 if self.parentFileWindow.sideViewTab is not None else 1
- width = min(prect.width() - 20, width) # // factor
- height = min(prect.height() - 60, height) # // factor
+ factor = 2 if self.parentFileWindow.sideViewTab is not None else 1
+ width = min((prect.width() - 20)//factor, width)
+ height = min(prect.height() - 80, height)
self.view.setFixedWidth(width)
self.view.setFixedHeight(height)
# self.resize(width + frameWidth * 2, height + frameWidth * 2)