From acfe33c77a06337e4d1dec7857cdd337130c7dd5 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 6 Apr 2021 14:31:40 +0200 Subject: [PATCH] Don't use CHILD_OFFSET if modifiable dictionary does not contain label --- .../tools/settings/settings/widgets/dict_mutable_widget.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpype/tools/settings/settings/widgets/dict_mutable_widget.py b/openpype/tools/settings/settings/widgets/dict_mutable_widget.py index 3b5f15f519..30e12aa5ac 100644 --- a/openpype/tools/settings/settings/widgets/dict_mutable_widget.py +++ b/openpype/tools/settings/settings/widgets/dict_mutable_widget.py @@ -550,7 +550,9 @@ class DictMutableKeysWidget(BaseWidget): label = self.entity.label body_widget = None + content_left_margin = 0 if label: + content_left_margin = CHILD_OFFSET body_widget = ExpandingWidget(label, self) main_layout.addWidget(body_widget) label = None @@ -565,7 +567,9 @@ class DictMutableKeysWidget(BaseWidget): content_widget.setObjectName("ContentWidget") content_widget.setProperty("content_state", content_state) content_layout = QtWidgets.QVBoxLayout(content_widget) - content_layout.setContentsMargins(CHILD_OFFSET, 5, 0, bottom_margin) + content_layout.setContentsMargins( + content_left_margin, 5, 0, bottom_margin + ) if body_widget is None: main_layout.addWidget(content_widget)