summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrenda-br2023-02-20 15:19:50 +0530
committerbrenda-br2023-02-20 15:19:50 +0530
commite816c10f23eda7f8727ee691d89921b7f8f462b6 (patch)
treeb782afe29c4e0aba35ae37cffbfed6cc3463e52f
parentf188f7d75a73a1cda3c9e65505fffdd0f8c063e2 (diff)
downloadChemical-PFD-e816c10f23eda7f8727ee691d89921b7f8f462b6.tar.gz
Chemical-PFD-e816c10f23eda7f8727ee691d89921b7f8f462b6.tar.bz2
Chemical-PFD-e816c10f23eda7f8727ee691d89921b7f8f462b6.zip
Thicker and bigger size grip
-rw-r--r--src/main/python/shapes/shapes.py8
-rw-r--r--src/main/python/utils/graphics.py3
2 files changed, 5 insertions, 6 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index 20ca4a8..afd25b8 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -138,17 +138,17 @@ class SizeGripItem(QGraphicsPathItem):
"""
width = height = 0
if self.direction is Qt.Horizontal:
- height = self.parentItem().boundingRect().height()+30
+ height = self.parentItem().boundingRect().height()+40
else:
width = self.parentItem().boundingRect().width()+35
path = QPainterPath()
if(m_index == 0):
- tempRect = QRectF((-width / 2),( -height / 2)-15, width, height)
+ tempRect = QRectF((-width / 2),( -height / 2)-20, width, height)
if(m_index == 1):
tempRect = QRectF((-width / 2)-17.5,( -height / 2), width, height)
if(m_index == 2):
- tempRect = QRectF((-width / 2),( -height / 2)+15, width, height)
+ tempRect = QRectF((-width / 2),( -height / 2)+20, width, height)
if(m_index == 3):
tempRect = QRectF((-width / 2)+17.5,( -height / 2), width, height)
#print(tempRect)
@@ -228,7 +228,7 @@ class SizeGripItem(QGraphicsPathItem):
def show(self):
# make self visible
- self.setPen(QPen(QColor(128, 128, 128,200), 2))
+ self.setPen(QPen(QColor(128, 128, 128,150), 4))
def hide(self):
# hide self by setting pen to transparent
diff --git a/src/main/python/utils/graphics.py b/src/main/python/utils/graphics.py
index 7398a2d..b66e68b 100644
--- a/src/main/python/utils/graphics.py
+++ b/src/main/python/utils/graphics.py
@@ -115,8 +115,7 @@ class CustomScene(QGraphicsScene):
for j in i.lines:
self.count+=1
self.undoStack.push(deleteCommand(j, self))
- if itemToDelete.__class__ != shapes.line.Grabber:
- self.undoStack.push(deleteCommand(itemToDelete, self))
+ self.undoStack.push(deleteCommand(itemToDelete, self))
def itemMoved(self, movedItem, lastPos):
#item move event, checks if item is moved