diff options
| author | tassaron | 2017-07-02 14:19:15 -0400 |
|---|---|---|
| committer | tassaron | 2017-07-02 14:19:15 -0400 |
| commit | 38557f29f91b8abc68ec3408ce466ee8a5da815e (patch) | |
| tree | 9018c2357645aca9fd5296cfa75bf9ed0cf297ee /src/components | |
| parent | 0a9002b42cbfa51fb826868a215202c83c97c330 (diff) | |
rm unneeded imports, work on freezing
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/__base__.py | 2 | ||||
| -rw-r--r-- | src/components/text.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/components/__base__.py b/src/components/__base__.py index 00601e7..b5e7d93 100644 --- a/src/components/__base__.py +++ b/src/components/__base__.py @@ -1,4 +1,4 @@ -from PyQt5 import uic, QtGui, QtCore, QtWidgets +from PyQt5 import uic, QtCore, QtWidgets from PIL import Image import os diff --git a/src/components/text.py b/src/components/text.py index 96421e6..6c5c4eb 100644 --- a/src/components/text.py +++ b/src/components/text.py @@ -3,7 +3,7 @@ from PyQt5.QtGui import QPainter, QColor, QFont from PyQt5 import QtGui, QtCore, QtWidgets from PIL.ImageQt import ImageQt import os -import io +import sys from . import __base__ @@ -136,7 +136,10 @@ class Component(__base__.Component): painter = QPainter(image) self.titleFont.setPixelSize(self.fontSize) painter.setFont(self.titleFont) - painter.setPen(QColor(*self.textColor[::-1])) + if sys.byteorder == 'big': + painter.setPen(QColor(*self.textColor)) + else: + painter.setPen(QColor(*self.textColor[::-1])) painter.drawText(x, y, self.title) painter.end() |
