89 colDlg.setOptions(QColorDialog.ShowAlphaChannel) |
89 colDlg.setOptions(QColorDialog.ShowAlphaChannel) |
90 # Set current colour last to avoid conflicts with alpha channel |
90 # Set current colour last to avoid conflicts with alpha channel |
91 colDlg.setCurrentColor(self.__coloursDict[colorKey][0]) |
91 colDlg.setCurrentColor(self.__coloursDict[colorKey][0]) |
92 colDlg.currentColorChanged.connect( |
92 colDlg.currentColorChanged.connect( |
93 lambda col: self.colourChanged.emit(colorKey, col)) |
93 lambda col: self.colourChanged.emit(colorKey, col)) |
94 colDlg.exec_() |
94 colDlg.exec() |
95 |
95 |
96 if colDlg.result() == colDlg.Accepted: |
96 if colDlg.result() == colDlg.Accepted: |
97 colour = colDlg.selectedColor() |
97 colour = colDlg.selectedColor() |
98 size = button.iconSize() |
98 size = button.iconSize() |
99 pm = QPixmap(size.width(), size.height()) |
99 pm = QPixmap(size.width(), size.height()) |