2023-10-02 12:06:35 -04:00
|
|
|
import { Widget, App } from '../../imports.js';
|
|
|
|
const { Box, Label } = Widget;
|
2023-09-05 15:10:25 -04:00
|
|
|
|
2023-09-11 19:57:21 -04:00
|
|
|
import { EventBox } from '../misc/cursorbox.js';
|
|
|
|
|
2023-10-02 12:06:35 -04:00
|
|
|
|
2023-09-05 15:10:25 -04:00
|
|
|
export const QsToggle = EventBox({
|
|
|
|
className: 'toggle-off',
|
2023-10-14 13:54:45 -04:00
|
|
|
onPrimaryClickRelease: () => App.toggleWindow('quick-settings'),
|
2023-09-12 14:42:53 -04:00
|
|
|
connections: [
|
2023-10-02 12:06:35 -04:00
|
|
|
[App, (box, windowName, visible) => {
|
2023-09-12 14:42:53 -04:00
|
|
|
if (windowName == 'quick-settings') {
|
2023-09-21 20:01:14 -04:00
|
|
|
box.toggleClassName('toggle-on', visible);
|
2023-09-12 14:42:53 -04:00
|
|
|
}
|
|
|
|
}],
|
|
|
|
],
|
2023-09-05 15:10:25 -04:00
|
|
|
child: Box({
|
|
|
|
className: 'quick-settings-toggle',
|
|
|
|
vertical: false,
|
|
|
|
child: Label({
|
|
|
|
label: " ",
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
});
|