mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
use new widgets in attribute definitions
This commit is contained in:
parent
f6ee5db227
commit
9cc8f1818c
1 changed files with 7 additions and 3 deletions
|
|
@ -16,7 +16,11 @@ from openpype.lib.attribute_definitions import (
|
|||
UISeparatorDef,
|
||||
UILabelDef
|
||||
)
|
||||
from openpype.tools.utils import CustomTextComboBox
|
||||
from openpype.tools.utils import (
|
||||
CustomTextComboBox,
|
||||
FocusSpinBox,
|
||||
FocusDoubleSpinBox,
|
||||
)
|
||||
from openpype.widgets.nice_checkbox import NiceCheckbox
|
||||
|
||||
from .files_widget import FilesWidget
|
||||
|
|
@ -243,10 +247,10 @@ class NumberAttrWidget(_BaseAttrDefWidget):
|
|||
def _ui_init(self):
|
||||
decimals = self.attr_def.decimals
|
||||
if decimals > 0:
|
||||
input_widget = QtWidgets.QDoubleSpinBox(self)
|
||||
input_widget = FocusDoubleSpinBox(self)
|
||||
input_widget.setDecimals(decimals)
|
||||
else:
|
||||
input_widget = QtWidgets.QSpinBox(self)
|
||||
input_widget = FocusSpinBox(self)
|
||||
|
||||
if self.attr_def.tooltip:
|
||||
input_widget.setToolTip(self.attr_def.tooltip)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue