mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
color widget can show color dialog without alpha based on use_alpha attribute
This commit is contained in:
parent
ac219c1535
commit
0c99c730c7
2 changed files with 41 additions and 22 deletions
|
|
@ -25,7 +25,9 @@ class ColorWidget(InputWidget):
|
|||
self._dialog.open()
|
||||
return
|
||||
|
||||
dialog = ColorDialog(self.input_field.color(), self)
|
||||
dialog = ColorDialog(
|
||||
self.input_field.color(), self.entity.use_alpha, self
|
||||
)
|
||||
self._dialog = dialog
|
||||
|
||||
dialog.open()
|
||||
|
|
@ -120,12 +122,12 @@ class ColorViewer(QtWidgets.QWidget):
|
|||
|
||||
|
||||
class ColorDialog(QtWidgets.QDialog):
|
||||
def __init__(self, color=None, parent=None):
|
||||
def __init__(self, color=None, use_alpha=True, parent=None):
|
||||
super(ColorDialog, self).__init__(parent)
|
||||
|
||||
self.setWindowTitle("Color picker dialog")
|
||||
|
||||
picker_widget = ColorPickerWidget(color, self)
|
||||
picker_widget = ColorPickerWidget(color, use_alpha, self)
|
||||
|
||||
footer_widget = QtWidgets.QWidget(self)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue