diff options
| author | DH4 | 2017-06-05 02:38:10 -0500 |
|---|---|---|
| committer | DH4 | 2017-06-05 02:38:10 -0500 |
| commit | 0a8a2fdf71aeff8ea22905cdf00b6c315cbb29ee (patch) | |
| tree | 69f8b78396a09b1cbdfe79ff0089b4e70246f7fd /components | |
| parent | 5b78a26d8069e48ad5ba88f457b563620be72173 (diff) | |
Font Offset
Diffstat (limited to 'components')
| -rw-r--r-- | components/text.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/text.py b/components/text.py index 7efde39..7b2289d 100644 --- a/components/text.py +++ b/components/text.py @@ -69,9 +69,11 @@ class Component(__base__.Component): if self.alignment == 0: #Left x = self.xPosition if self.alignment == 1: #Middle - x = self.xPosition - fm.width(self.title)/2 + offset = fm.width(self.title)/2 + x = self.xPosition - offset if self.alignment == 2: #Right - x = self.xPosition - fm.width(self.title) + offset = fm.width(self.title) + x = self.xPosition - offset return x, self.yPosition |
