mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
implemented label widget and splitter widget
This commit is contained in:
parent
3bde8a77a2
commit
3cf1c91e2b
2 changed files with 38 additions and 0 deletions
|
|
@ -152,6 +152,10 @@ QPushButton[btn-type="expand-toggle"] {
|
|||
background: #141a1f;
|
||||
}
|
||||
|
||||
#SplitterItem {
|
||||
background-color: #1d272f;
|
||||
}
|
||||
|
||||
QTabWidget::pane {
|
||||
border-top-style: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2668,6 +2668,37 @@ class DictFormWidget(QtWidgets.QWidget, SettingObject):
|
|||
return values, self.is_group
|
||||
|
||||
|
||||
class LabelWidget(QtWidgets.QWidget):
|
||||
is_input_type = False
|
||||
|
||||
def __init__(self, configuration, parent=None):
|
||||
super(LabelWidget, self).__init__(parent)
|
||||
self.setObjectName("LabelWidget")
|
||||
|
||||
label = configuration["label"]
|
||||
|
||||
layout = QtWidgets.QHBoxLayout(self)
|
||||
layout.setContentsMargins(5, 5, 5, 5)
|
||||
label_widget = QtWidgets.QLabel(label, self)
|
||||
layout.addWidget(label_widget)
|
||||
|
||||
|
||||
class SplitterWidget(QtWidgets.QWidget):
|
||||
is_input_type = False
|
||||
_height = 2
|
||||
|
||||
def __init__(self, configuration, parent=None):
|
||||
super(SplitterWidget, self).__init__(parent)
|
||||
|
||||
layout = QtWidgets.QHBoxLayout(self)
|
||||
layout.setContentsMargins(5, 5, 5, 5)
|
||||
splitter_item = QtWidgets.QWidget(self)
|
||||
splitter_item.setObjectName("SplitterItem")
|
||||
splitter_item.setMinimumHeight(self._height)
|
||||
splitter_item.setMaximumHeight(self._height)
|
||||
layout.addWidget(splitter_item)
|
||||
|
||||
|
||||
TypeToKlass.types["boolean"] = BooleanWidget
|
||||
TypeToKlass.types["number"] = NumberWidget
|
||||
TypeToKlass.types["text"] = TextWidget
|
||||
|
|
@ -2679,3 +2710,6 @@ TypeToKlass.types["dict"] = DictWidget
|
|||
TypeToKlass.types["dict-invisible"] = DictInvisible
|
||||
TypeToKlass.types["path-widget"] = PathWidget
|
||||
TypeToKlass.types["dict-form"] = DictFormWidget
|
||||
|
||||
TypeToKlass.types["label"] = LabelWidget
|
||||
TypeToKlass.types["splitter"] = SplitterWidget
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue