diff options
Diffstat (limited to 'components')
| -rw-r--r-- | components/__base__.py | 4 | ||||
| -rw-r--r-- | components/text.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/components/__base__.py b/components/__base__.py index b95edf4..3ccb5dc 100644 --- a/components/__base__.py +++ b/components/__base__.py @@ -24,7 +24,9 @@ class Component: exec('self.%s = value' % var) def pickColor(self): - color = QtGui.QColorDialog.getColor() + dialog = QtGui.QColorDialog() + dialog.setOption(QtGui.QColorDialog.ShowAlphaChannel, True) + color = dialog.getColor() if color.isValid(): RGBstring = '%s,%s,%s' % ( str(color.red()), str(color.green()), str(color.blue())) diff --git a/components/text.py b/components/text.py index 68cffca..e8fb3d5 100644 --- a/components/text.py +++ b/components/text.py @@ -31,7 +31,7 @@ class Component(__base__.Component): page.comboBox_textAlign.addItem("Right") page.lineEdit_textColor.setText('%s,%s,%s' % self.textColor) - page.pushButton_textColor.clicked.connect(lambda: self.pickColor()) + page.pushButton_textColor.clicked.connect(self.pickColor) btnStyle = "QPushButton { background-color : %s; outline: none; }" \ % QColor(*self.textColor).name() page.pushButton_textColor.setStyleSheet(btnStyle) |
