Fixed Text Colors & update button color on manual value change.

This commit is contained in:
DH4 2017-07-01 00:01:29 -05:00
parent a95ecd7e42
commit 0a9002b42c
1 changed files with 4 additions and 1 deletions

View File

@ -65,6 +65,9 @@ class Component(__base__.Component):
self.yPosition = self.page.spinBox_yTextAlign.value()
self.textColor = self.RGBFromString(
self.page.lineEdit_textColor.text())
btnStyle = "QPushButton { background-color : %s; outline: none; }" \
% QColor(*self.textColor).name()
self.page.pushButton_textColor.setStyleSheet(btnStyle)
self.parent.drawPreview()
super().update()
@ -133,7 +136,7 @@ class Component(__base__.Component):
painter = QPainter(image)
self.titleFont.setPixelSize(self.fontSize)
painter.setFont(self.titleFont)
painter.setPen(QColor(*self.textColor))
painter.setPen(QColor(*self.textColor[::-1]))
painter.drawText(x, y, self.title)
painter.end()