83 colorKey = button.property("colorKey") |
83 colorKey = button.property("colorKey") |
84 hasAlpha = button.property("hasAlpha") |
84 hasAlpha = button.property("hasAlpha") |
85 |
85 |
86 colDlg = QColorDialog(self) |
86 colDlg = QColorDialog(self) |
87 if hasAlpha: |
87 if hasAlpha: |
88 colDlg.setOptions(QColorDialog.ShowAlphaChannel) |
88 colDlg.setOptions(QColorDialog.ColorDialogOption.ShowAlphaChannel) |
89 # Set current colour last to avoid conflicts with alpha channel |
89 # Set current colour last to avoid conflicts with alpha channel |
90 colDlg.setCurrentColor(self.__coloursDict[colorKey][0]) |
90 colDlg.setCurrentColor(self.__coloursDict[colorKey][0]) |
91 colDlg.currentColorChanged.connect( |
91 colDlg.currentColorChanged.connect( |
92 lambda col: self.colourChanged.emit(colorKey, col)) |
92 lambda col: self.colourChanged.emit(colorKey, col)) |
93 colDlg.exec() |
93 colDlg.exec() |