2023-10-31 08:32:40 -04:00
|
|
|
import { Box, Label, Revealer } from 'resource:///com/github/Aylur/ags/widget.js';
|
2023-10-02 12:06:35 -04:00
|
|
|
|
2024-01-13 23:38:31 -05:00
|
|
|
import ButtonGrid from './button-grid.ts';
|
|
|
|
import SliderBox from './slider-box.ts';
|
|
|
|
import Player from '../media-player/player.ts';
|
|
|
|
import PopupWindow from '../misc/popup.ts';
|
|
|
|
import ToggleButton from './toggle-button.ts';
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-10-02 12:06:35 -04:00
|
|
|
|
2023-11-16 15:02:00 -05:00
|
|
|
const QuickSettingsWidget = () => {
|
|
|
|
const rev = Revealer({
|
|
|
|
transition: 'slide_down',
|
|
|
|
child: Player(),
|
|
|
|
});
|
|
|
|
|
|
|
|
return Box({
|
2023-12-23 01:14:21 -05:00
|
|
|
class_name: 'qs-container',
|
2023-11-16 15:02:00 -05:00
|
|
|
vertical: true,
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Box({
|
2023-12-23 01:14:21 -05:00
|
|
|
class_name: 'quick-settings',
|
2023-11-16 15:02:00 -05:00
|
|
|
vertical: true,
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Label({
|
|
|
|
label: 'Control Center',
|
2023-12-23 01:14:21 -05:00
|
|
|
class_name: 'title',
|
2023-11-16 15:02:00 -05:00
|
|
|
hpack: 'start',
|
|
|
|
css: `
|
2024-01-06 12:24:09 -05:00
|
|
|
margin-left: 20px;
|
|
|
|
margin-bottom: 30px;
|
|
|
|
`,
|
2023-11-16 15:02:00 -05:00
|
|
|
}),
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-11-16 15:02:00 -05:00
|
|
|
ButtonGrid(),
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-11-16 15:02:00 -05:00
|
|
|
SliderBox(),
|
2023-09-15 23:22:16 -04:00
|
|
|
|
2023-11-16 15:02:00 -05:00
|
|
|
ToggleButton(rev),
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-11-16 15:02:00 -05:00
|
|
|
],
|
|
|
|
}),
|
2023-10-20 23:11:21 -04:00
|
|
|
|
2023-11-16 15:02:00 -05:00
|
|
|
rev,
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-11-16 15:02:00 -05:00
|
|
|
],
|
|
|
|
});
|
|
|
|
};
|
2023-09-21 20:01:14 -04:00
|
|
|
|
2023-11-21 01:29:46 -05:00
|
|
|
const TOP_MARGIN = 6;
|
|
|
|
|
2023-10-16 18:11:19 -04:00
|
|
|
export default () => PopupWindow({
|
2023-10-20 23:11:21 -04:00
|
|
|
name: 'quick-settings',
|
|
|
|
anchor: ['top', 'right'],
|
2024-01-02 17:29:11 -05:00
|
|
|
margins: [TOP_MARGIN, 0, 0, 0],
|
2024-01-29 18:54:07 -05:00
|
|
|
content: QuickSettingsWidget(),
|
2023-09-12 14:22:21 -04:00
|
|
|
});
|