diff --git a/beat/editor/widgets/toolchaineditor.py b/beat/editor/widgets/toolchaineditor.py index 248d1daa23e3bbe8f055c3ab07306d26f3e19575..aacf1bd7afd8cf81918ab54f9e5c1575887e5d27 100644 --- a/beat/editor/widgets/toolchaineditor.py +++ b/beat/editor/widgets/toolchaineditor.py @@ -1079,7 +1079,10 @@ class Block(QGraphicsObject): alignement = Qt.AlignRight rect = QRect( - coord_x, self.height - self.radius + offset, max_width, self.pin_height + int(coord_x), + self.height - self.radius + offset, + max_width, + self.pin_height, ) textRect = QRect( @@ -1306,7 +1309,7 @@ class Block(QGraphicsObject): metrics = QFontMetrics(painter.font()) text_width = metrics.boundingRect(self.name).width() + 24 text_height = metrics.boundingRect(self.name).height() + 24 - margin = (text_width - self.custom_width) * 0.5 + margin = int((text_width - self.custom_width) * 0.5) text_rect = QRect(-margin, -text_height, text_width, text_height) painter.drawText(text_rect, Qt.AlignCenter, self.name)