From 53431c97741d2cdde097c9ddcbc12dd25af82c70 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:42:31 +0700 Subject: [PATCH] sidebar: make modules more accessible --- .config/ags/widgets/sideleft/tools/module.js | 46 ++++++++++---------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/.config/ags/widgets/sideleft/tools/module.js b/.config/ags/widgets/sideleft/tools/module.js index ad5365f6f..eae27147e 100644 --- a/.config/ags/widgets/sideleft/tools/module.js +++ b/.config/ags/widgets/sideleft/tools/module.js @@ -10,28 +10,30 @@ export default ({ revealChild = true, }) => { const headerButtonIcon = MaterialIcon(revealChild ? 'expand_less' : 'expand_more', 'norm'); - const header = Box({ - className: 'txt spacing-h-10', - children: [ - icon, - Label({ - className: 'txt-norm', - label: `${name}`, - }), - Box({ - hexpand: true, - }), - Button({ - className: 'sidebar-module-btn-arrow', - child: headerButtonIcon, - onClicked: () => { - console.log('clicked'); - content.revealChild = !content.revealChild; - headerButtonIcon.label = content.revealChild ? 'expand_less' : 'expand_more'; - }, - setup: setupCursorHover, - }) - ] + const header = Button({ + onClicked: () => { + content.revealChild = !content.revealChild; + headerButtonIcon.label = content.revealChild ? 'expand_less' : 'expand_more'; + }, + setup: setupCursorHover, + child: Box({ + className: 'txt spacing-h-10', + children: [ + icon, + Label({ + className: 'txt-norm', + label: `${name}`, + }), + Box({ + hexpand: true, + }), + Box({ + className: 'sidebar-module-btn-arrow', + homogeneous: true, + children: [headerButtonIcon], + }) + ] + }) }); const content = Revealer({ revealChild: revealChild,