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
|
|
|
|
2023-10-18 11:53:49 -04:00
|
|
|
import ButtonGrid from './button-grid.js';
|
|
|
|
import SliderBox from './slider-box.js';
|
|
|
|
import Player from '../media-player/player.js';
|
|
|
|
import PopupWindow from '../misc/popup.js';
|
|
|
|
import ToggleButton from './toggle-button.js';
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-10-02 12:06:35 -04:00
|
|
|
|
2023-10-17 13:47:02 -04:00
|
|
|
const QuickSettingsWidget = () => Box({
|
2023-10-20 23:11:21 -04:00
|
|
|
className: 'qs-container',
|
|
|
|
vertical: true,
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Box({
|
|
|
|
className: 'quick-settings',
|
|
|
|
vertical: true,
|
|
|
|
children: [
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-10-20 23:11:21 -04:00
|
|
|
Label({
|
|
|
|
label: 'Control Center',
|
|
|
|
className: 'title',
|
2023-11-06 18:37:23 -05:00
|
|
|
hpack: 'start',
|
|
|
|
css: 'margin-left: 20px',
|
2023-10-20 23:11:21 -04:00
|
|
|
}),
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-10-20 23:11:21 -04:00
|
|
|
ButtonGrid(),
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-10-20 23:11:21 -04:00
|
|
|
SliderBox(),
|
2023-09-15 23:22:16 -04:00
|
|
|
|
2023-10-20 23:11:21 -04:00
|
|
|
ToggleButton(),
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-10-20 23:11:21 -04:00
|
|
|
],
|
|
|
|
}),
|
|
|
|
|
|
|
|
Revealer({
|
|
|
|
transition: 'slide_down',
|
|
|
|
child: Player(),
|
|
|
|
}),
|
2023-09-12 14:22:21 -04:00
|
|
|
|
2023-10-20 23:11:21 -04:00
|
|
|
],
|
2023-09-21 20:01:14 -04:00
|
|
|
});
|
|
|
|
|
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'],
|
2023-11-06 18:37:23 -05:00
|
|
|
margins: [6, 5, 0],
|
2023-10-20 23:11:21 -04:00
|
|
|
child: QuickSettingsWidget(),
|
2023-09-12 14:22:21 -04:00
|
|
|
});
|