Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/formbridge/widgets/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ def __init__(self, layout: PlacementLayout, identity: object,
parent: QWidget | None = None) -> None:
super().__init__(parent)
self.setWindowFlags(Qt.WindowType.Widget)
# Object-name is the hook the host's QSS selector reads — matching
# `pyqt_reactive.theming.style_generator.generate_sidebar_pane_style()`'s
# `QWidget#SidebarPane` selector — so the host can paint the pane with the
# shared scheme's sidebar tone without the style bleeding into unrelated
# QWidget children.
self.setObjectName("SidebarPane")
self._layout = layout
self._identity = identity
self._owner = owner
Expand Down Expand Up @@ -218,6 +224,11 @@ def __init__(self, layout: PlacementLayout, identity: object, *,
parent: QWidget | None = None) -> None:
super().__init__(parent)
self.setWindowFlags(Qt.WindowType.Widget)
# Object-name hooks the host's QSS selector — matches
# `pyqt_reactive.theming.style_generator.generate_sidebar_bar_style()`'s
# `QWidget#SidebarToggle` — so the bar paints the scheme's header tone
# instead of leaking its parent's colour.
self.setObjectName("SidebarToggle")
self._layout = layout
self._identity = identity
self._heading = heading
Expand Down
Loading