sideleft: make it possible to un-expand

This commit is contained in:
end-4
2025-04-03 16:04:30 +02:00
parent 8bae3e14e9
commit 6750679d88
2 changed files with 7 additions and 13 deletions
+3 -3
View File
@@ -66,10 +66,10 @@ const expandButton = Button({
'enabled': false,
'toggle': (self) => {
self.attribute.enabled = !self.attribute.enabled;
// We don't expand the bar, but the expand button. Funny hax but it works
// (somehow directly expanding the sidebar directly makes it unable to unexpand)
self.toggleClassName('sidebar-expandbtn-enabled', self.attribute.enabled);
self.toggleClassName('sidebar-controlbtn-enabled', self.attribute.enabled);
widgetContent.toggleClassName('sidebar-left-expanded', self.attribute.enabled);
widgetContent.toggleClassName('sidebar-left', !self.attribute.enabled);
},
},
vpack: 'start',