sidebar pin fixes

This commit is contained in:
end-4
2023-12-27 19:37:23 +07:00
parent 717506b1f8
commit 5454b3cad3
6 changed files with 42 additions and 35 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ export const CornerBottomleft = () => Widget.Window({
name: 'cornerbl',
layer: 'top',
anchor: ['bottom', 'left'],
exclusivity: 'normal',
exclusivity: 'ignore',
visible: true,
child: RoundedCorner('bottomleft', { className: 'corner-black', }),
});
@@ -29,7 +29,7 @@ export const CornerBottomright = () => Widget.Window({
name: 'cornerbr',
layer: 'top',
anchor: ['bottom', 'right'],
exclusivity: 'normal',
exclusivity: 'ignore',
visible: true,
child: RoundedCorner('bottomright', { className: 'corner-black', }),
});
+15 -3
View File
@@ -57,7 +57,7 @@ const contentStack = Stack({
const navIndicator = NavigationIndicator(2, false, { // The line thing
className: 'sidebar-selector-highlight',
css: 'font-size: 0px; padding: 0rem 4.773rem;', // Shushhhh
css: 'font-size: 0px; padding: 0rem 4.160rem;', // Shushhhh
})
const navBar = Box({
@@ -88,11 +88,23 @@ const pinButton = Button({
self.toggleClassName('sidebar-pin-enabled', self._enabled);
const sideleftWindow = App.getWindow('sideleft');
const barWindow = App.getWindow('bar');
const cornerTopLeftWindow = App.getWindow('cornertl');
const sideleftContent = sideleftWindow.get_children()[0].get_children()[0].get_children()[1];
// console.log(sideleftWindow.exclusivity);
sideleftWindow.exclusivity = (self._enabled ? 'exclusive' : 'normal');
sideleftWindow.layer = (self._enabled ? 'bottom' : 'top');
sideleftContent.toggleClassName('sidebar-pinned', self._enabled);
if(self._enabled) {
sideleftWindow.layer = 'bottom';
barWindow.layer = 'bottom';
cornerTopLeftWindow.layer = 'bottom';
}
else {
sideleftWindow.layer = 'top';
barWindow.layer = 'top';
cornerTopLeftWindow.layer = 'top';
}
},
// QoL: Focus Pin button on open. Hit keybind -> space/enter = toggle pin state
connections: [[App, (self, currentName, visible) => {