summaryrefslogtreecommitdiff
path: root/src/editorui.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/editorui.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/editorui.py b/src/editorui.py
index b7d691a..5dd68b5 100644
--- a/src/editorui.py
+++ b/src/editorui.py
@@ -519,7 +519,7 @@ class KPEditorPathSegment(QtGui.QGraphicsPathItem):
self.rotation = 0
-
+
def makeStraight(self, start, end):
self.path.moveTo(start)
@@ -527,12 +527,13 @@ class KPEditorPathSegment(QtGui.QGraphicsPathItem):
QtCore.QPointF(end.x(), end.y()-5.0),
QtCore.QPointF(end.x(), end.y()+5.0),
QtCore.QPointF(start.x(), start.y()+5.0),
- QtCore.QPointF(start.x(), start.y()-5.0)]
+ QtCore.QPointF(start.x(), start.y()-5.0)]))
- graduate = QtGui.QRadialGradiant(QtCore.QPointF((end.x()/2)-(start.x()/2), (end.y()/2)-(start.y()/2) + 16), (end.x()/2)-(start.x()/2),
- graduate.setColorA(QColor(200, 210, 240))
- graduate.setColorB(QColor(150, 160, 190))
+ center = QtCore.QPointF((end.x()/2)-(start.x()/2), (end.y()/2)-((start.y()/2) + 16))
+ graduate = QtGui.QRadialGradiant(center, float((end.x()/2)-(start.x()/2)))
+ graduate.setColorA(QtGui.QColor(200, 210, 240))
+ graduate.setColorB(QtGui.QColor(150, 160, 190))
self.brush = QtGui.QBrush(graduate)
@@ -554,9 +555,10 @@ class KPEditorPathSegment(QtGui.QGraphicsPathItem):
self.path.subtracted(r)
- graduate = QtGui.QRadialGradiant(QtCore.QPointF((end.x()/2)-(start.x()/2), (end.y()/2)-(start.y()/2) + 16), (end.x()/2)-(start.x()/2),
- graduate.setColorA(QColor(200, 210, 240))
- graduate.setColorB(QColor(150, 160, 190))
+ center = QtCore.QPointF((end.x()/2)-(start.x()/2), (end.y()/2)-((start.y()/2) + 16))
+ graduate = QtGui.QRadialGradiant(center, float((end.x()/2)-(start.x()/2)))
+ graduate.setColorA(QtGui.QColor(200, 210, 240))
+ graduate.setColorB(QtGui.QColor(150, 160, 190))
self.brush = QtGui.QBrush(graduate)