From 4aef5bfdb7f04dde13b1c6a94172824ce143be6e Mon Sep 17 00:00:00 2001 From: Maximilian Siess Date: Fri, 21 Apr 2017 01:00:17 +0200 Subject: changed differentiater of text alignment from string to int --- core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core.py') diff --git a/core.py b/core.py index 1dd6438..b362087 100644 --- a/core.py +++ b/core.py @@ -52,11 +52,11 @@ class Core(): yPosition = yOffset fm = QtGui.QFontMetrics(font) - if alignment == "Left": + if alignment == 0: #Left xPosition = xOffset - if alignment == "Middle": + if alignment == 1: #Middle xPosition = xOffset - fm.width(titleText)/2 - if alignment == "Right": + if alignment == 2: #Right xPosition = xOffset - fm.width(titleText) painter.drawText(xPosition, yPosition, titleText) painter.end() -- cgit v1.2.3