Skip to content

Commit

Permalink
Merge pull request #78 from brainglobe/change-collapsed-icon
Browse files Browse the repository at this point in the history
Changed collapsed icon for CollapsibleWidget
  • Loading branch information
alessandrofelder authored May 24, 2024
2 parents f7bd231 + a7b7c73 commit 6a2f73c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion brainglobe_utils/qtpy/collapsible_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def __init__(
self,
title: str = "",
parent: Optional[QWidget] = None,
expanded_icon: Optional[str] = "▼",
collapsed_icon: Optional[str] = "▶",
):
"""
Initializes a new CollapsibleWidget instance.
Expand All @@ -40,7 +42,12 @@ def __init__(
parent : QWidget or None, optional
The parent widget.
"""
super().__init__(title, parent)
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 6a2f73c

Please sign in to comment.