diff options
| author | tassaron | 2017-06-22 19:59:31 -0400 |
|---|---|---|
| committer | tassaron | 2017-06-22 19:59:31 -0400 |
| commit | b21a953dda4ec54d494c813af8f687d53d3675d9 (patch) | |
| tree | 035751e6895bec781c5707ae7be4e6e44ab7e157 /components/text.py | |
| parent | 5c74d496a960042ed4a4279328dc81e23dfdc1d9 (diff) | |
bugfixes
Diffstat (limited to 'components/text.py')
| -rw-r--r-- | components/text.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/text.py b/components/text.py index 6c465b1..536a9ba 100644 --- a/components/text.py +++ b/components/text.py @@ -19,12 +19,14 @@ class Component(__base__.Component): def widget(self, parent): height = int(parent.settings.value('outputHeight')) width = int(parent.settings.value('outputWidth')) + self.parent = parent self.textColor = (255, 255, 255) self.title = 'Text' self.alignment = 1 self.fontSize = height / 13.5 - self.xPosition = width / 2 + fm = QtGui.QFontMetrics(self.titleFont) + self.xPosition = width / 2 - fm.width(self.title)/2 self.yPosition = height / 2 * 1.036 page = uic.loadUi(os.path.join( |
