summaryrefslogtreecommitdiff
path: root/src/main/python
diff options
context:
space:
mode:
authorbrenda-br2023-02-21 18:08:43 +0530
committerbrenda-br2023-02-21 18:08:43 +0530
commit4b9b56ae9372f5b0582c9f3e9958f5deeb8cad17 (patch)
tree81552e6687019a0cd7dfa06d3216cc7c43b7fcf4 /src/main/python
parenta6814bfd4c6a9eb228a8939d1dee0dd0b5d16786 (diff)
downloadChemical-PFD-4b9b56ae9372f5b0582c9f3e9958f5deeb8cad17.tar.gz
Chemical-PFD-4b9b56ae9372f5b0582c9f3e9958f5deeb8cad17.tar.bz2
Chemical-PFD-4b9b56ae9372f5b0582c9f3e9958f5deeb8cad17.zip
Size Grip Design(Revised)
Diffstat (limited to 'src/main/python')
-rw-r--r--src/main/python/shapes/shapes.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index e0d6617..8fb37d6 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -138,19 +138,18 @@ class SizeGripItem(QGraphicsPathItem):
"""
width = height = 0
if self.direction is Qt.Horizontal:
- height = self.parentItem().boundingRect().height()+40
-
+ height = self.parentItem().boundingRect().height()+20
else:
- width = self.parentItem().boundingRect().width()+35
+ width = self.parentItem().boundingRect().width()+20
path = QPainterPath()
if(m_index == 0):
- tempRect = QRectF((-width / 2),( -height / 2)-20, width, height+10)
+ tempRect = QRectF((-width / 2),( -height / 2)-10, width, height)
if(m_index == 1):
- tempRect = QRectF((-width / 2)-17.5,( -height / 2), width+8.75, height)
+ tempRect = QRectF((-width / 2)-10,( -height / 2), width, height)
if(m_index == 2):
- tempRect = QRectF((-width / 2),( -height / 2)+20, width, height-10)
+ tempRect = QRectF((-width / 2),( -height / 2)+10, width, height)
if(m_index == 3):
- tempRect = QRectF((-width / 2)+17.5,( -height / 2), width-8.75, height)
+ tempRect = QRectF((-width / 2)+10,( -height / 2), width, height)
#print(tempRect)
path.addRect(tempRect)
self.setPath(path)
@@ -228,7 +227,7 @@ class SizeGripItem(QGraphicsPathItem):
def show(self):
# make self visible
- self.setPen(QPen(QColor(128, 128, 128,150), 2))
+ self.setPen(QPen(QColor(128, 128, 128,150), 4))
def hide(self):
# hide self by setting pen to transparent
@@ -350,7 +349,7 @@ class LineGripItem(QGraphicsPathItem):
return
# initialize a line and add on scene
# restrict circle grip to one line
- if self.size is None and len(self.lines) > 0:
+ if self.size is None and len(self.lines) < 0:
pass
else:
startPoint = self.parentItem().mapToScene(self.pos()) # first point of line