From a7b7c73f94dd625f010f1a5c492443d13e9be0a6 Mon Sep 17 00:00:00 2001 From: IgorTatarnikov Date: Fri, 24 May 2024 15:11:53 +0100 Subject: [PATCH] Expose the expanded icon in the constructor as well --- brainglobe_utils/qtpy/collapsible_widget.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/brainglobe_utils/qtpy/collapsible_widget.py b/brainglobe_utils/qtpy/collapsible_widget.py index 8c15b46..ee22bd4 100644 --- a/brainglobe_utils/qtpy/collapsible_widget.py +++ b/brainglobe_utils/qtpy/collapsible_widget.py @@ -29,6 +29,7 @@ def __init__( self, title: str = "", parent: Optional[QWidget] = None, + expanded_icon: Optional[str] = "▼", collapsed_icon: Optional[str] = "▶", ): """ @@ -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)