Skip to content

Commit

Permalink
Expose the expanded icon in the constructor as well
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed May 24, 2024
1 parent ec81b8f commit a7b7c73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion brainglobe_utils/qtpy/collapsible_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(
self,
title: str = "",
parent: Optional[QWidget] = None,
expanded_icon: Optional[str] = "▼",
collapsed_icon: Optional[str] = "▶",
):
"""
Expand All @@ -41,7 +42,12 @@ def __init__(
parent : QWidget or None, optional
The parent widget.
"""
super().__init__(title, parent, collapsedIcon=collapsed_icon)
super().__init__(
title,
parent,
expandedIcon=expanded_icon,
collapsedIcon=collapsed_icon,
)
self.currently_expanded = False

self.toggled.connect(self._on_toggle)
Expand Down

0 comments on commit a7b7c73

Please sign in to comment.