Update volumemixer.js

This commit is contained in:
end-4
2024-03-27 17:50:03 +07:00
parent 33f871b698
commit 0537e94004
@@ -6,11 +6,9 @@ import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';
const { Box, Button, Icon, Label, Scrollable, Slider, Stack } = Widget;
import { MaterialIcon } from '../../.commonwidgets/materialicon.js';
import { setupCursorHover } from '../../.widgetutils/cursorhover.js';
import { AnimatedSlider } from '../../.commonwidgets/cairo_slider.js';
// import { AnimatedSlider } from '../../.commonwidgets/cairo_slider.js';
const AppVolume = (stream) => {
// console.log(stream)
return Box({
const AppVolume = (stream) => Box({
className: 'sidebar-volmixer-stream spacing-h-10',
children: [
Icon({
@@ -35,11 +33,9 @@ const AppVolume = (stream) => {
truncate: 'end',
label: stream.description,
className: 'txt-small',
setup: (self) => {
self.hook(stream, (self) => {
setup: (self) => self.hook(stream, (self) => {
self.label = `${stream.description}`
})
}
}),
Slider({
drawValue: false,
@@ -50,11 +46,9 @@ const AppVolume = (stream) => {
onChange: ({ value }) => {
stream.volume = value;
},
setup: (self) => {
self.hook(stream, (self) => {
setup: (self) => self.hook(stream, (self) => {
self.value = stream.volume;
})
}
}),
// Box({
// homogeneous: true,
@@ -67,8 +61,7 @@ const AppVolume = (stream) => {
]
})
]
})
}
});
export default (props) => {
const emptyContent = Box({