Skip to content

Commit 3b895a2

Browse files
committed
Theme manager: limit setContentsMargins to only "dock" + "Contents" named widgets (fixes tutorial when changing themes)
1 parent 06f4591 commit 3b895a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/themes/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def set_dock_margins(self, content_margins=None, layout_margins=None, object_nam
8383
if child.objectName().startswith("dock") and child.objectName().endswith("Contents"):
8484
# Set content margins on QDock* widget
8585
child.setContentsMargins(*content_margins)
86-
if child.layout() and layout_margins:
87-
# Set content margins on the QDock Layout (which has additional margins)
88-
child.layout().setContentsMargins(*layout_margins)
86+
if child.layout() and layout_margins:
87+
# Set content margins on the QDock Layout (which has additional margins)
88+
child.layout().setContentsMargins(*layout_margins)
8989

9090
def set_toolbar_buttons(self, toolbar, icon_size=24, settings=None):
9191
"""Iterate through toolbar button settings, and apply them to each button.

0 commit comments

Comments
 (0)