summaryrefslogtreecommitdiff
path: root/src/editorui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/editorui/paths.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/editorui/paths.py b/src/editorui/paths.py
index c978a9b..c8cac78 100644
--- a/src/editorui/paths.py
+++ b/src/editorui/paths.py
@@ -263,8 +263,7 @@ class KPEditorPath(QtGui.QGraphicsLineItem):
def __init__(self, pathRef):
QtGui.QPushButton.__init__(self)
- self.setIconSize(QtCore.QSize(32,32))
- self.setFixedSize(64,64)
+ self.setFixedSize(48,48)
self.iconList = [QtGui.QIcon("Resources/Key.png"),
QtGui.QIcon("Resources/SecretKey.png")]
@@ -311,6 +310,7 @@ class KPEditorPath(QtGui.QGraphicsLineItem):
def paintEvent(self, event):
painter = QtGui.QPainter(self)
contentsRect = self.contentsRect()
+ smallRect = QtCore.QRect(12, 12, 24, 24)
painter.setRenderHint(QtGui.QPainter.SmoothPixmapTransform)
if self.path > 0:
@@ -333,15 +333,15 @@ class KPEditorPath(QtGui.QGraphicsLineItem):
painter.restore()
if self.isDown():
- self.iconList[self.secret].paint(painter, contentsRect, Qt.AlignCenter, QtGui.QIcon.Disabled)
+ self.iconList[self.secret].paint(painter, smallRect, Qt.AlignCenter, QtGui.QIcon.Disabled)
else:
- self.iconList[self.secret].paint(painter, contentsRect, Qt.AlignCenter)
+ self.iconList[self.secret].paint(painter, smallRect, Qt.AlignCenter)
else:
if self.isDown():
- self.unlockIcon.paint(painter, contentsRect, Qt.AlignCenter, QtGui.QIcon.Disabled)
+ self.unlockIcon.paint(painter, smallRect, Qt.AlignCenter, QtGui.QIcon.Disabled)
else:
- self.unlockIcon.paint(painter, contentsRect, Qt.AlignCenter)
+ self.unlockIcon.paint(painter, smallRect, Qt.AlignCenter)
painter.end()
@@ -381,7 +381,7 @@ class KPEditorPath(QtGui.QGraphicsLineItem):
KPEditorPath.SELECTION_PEN = QtGui.QPen(Qt.blue, 1, Qt.DotLine)
self.unlock = self.UnlockButton(self._pathRef)
- self.unlockProxy = self.HiddenProxy(self.unlock, self, -32, -32)
+ self.unlockProxy = self.HiddenProxy(self.unlock, self, -24, -24)
self.updatePosition()