mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
ok btn has same width as cancel btn
This commit is contained in:
parent
faa6fdcd08
commit
c496386b47
1 changed files with 9 additions and 0 deletions
|
|
@ -141,9 +141,18 @@ class ColorDialog(QtWidgets.QDialog):
|
|||
cancel_btn.clicked.connect(self.on_cancel_clicked)
|
||||
|
||||
self.picker_widget = picker_widget
|
||||
self.ok_btn = ok_btn
|
||||
self.cancel_btn = cancel_btn
|
||||
|
||||
self._result = None
|
||||
|
||||
def showEvent(self, event):
|
||||
super(ColorDialog, self).showEvent(event)
|
||||
|
||||
btns_width = max(self.ok_btn.width(), self.cancel_btn.width())
|
||||
self.ok_btn.setFixedWidth(btns_width)
|
||||
self.cancel_btn.setFixedWidth(btns_width)
|
||||
|
||||
def on_ok_clicked(self):
|
||||
self._result = self.picker_widget.color()
|
||||
self.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue