Palette plugin is open/closed in the sidebar

Hi! Is there a way to detect if a palette plugin is open/closed in the side bar (from the plugin itself)? I’d like to turn it on/off depending on that.

I use this code in Color Flow :

if self.dialog.frame().origin.y == 0:
 #trigger update
1 Like

Thank you!

Whether or not a palette is expanded or collapsed can be read with the following code:

paletteTitle = "Some Title" # localized title of the palette
isClosed = bool(Glyphs.defaults["PanelPaneCollapsed_" + paletteTitle])
1 Like