forked from Shinonome/dots-hyprland
fix bar volume scrolling
This commit is contained in:
@@ -39,18 +39,6 @@ export default () => {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
const SpaceRightDefaultClicks = (child) => Widget.EventBox({
|
const SpaceRightDefaultClicks = (child) => Widget.EventBox({
|
||||||
onScrollUp: () => {
|
|
||||||
if (!Audio.speaker) return;
|
|
||||||
if (Audio.speaker.volume <= 0.09) Audio.speaker.volume += 0.01;
|
|
||||||
else Audio.speaker.volume += 0.03;
|
|
||||||
Indicator.popup(1);
|
|
||||||
},
|
|
||||||
onScrollDown: () => {
|
|
||||||
if (!Audio.speaker) return;
|
|
||||||
if (Audio.speaker.volume <= 0.09) Audio.speaker.volume -= 0.01;
|
|
||||||
else Audio.speaker.volume -= 0.03;
|
|
||||||
Indicator.popup(1);
|
|
||||||
},
|
|
||||||
onHover: () => { barStatusIcons.toggleClassName('bar-statusicons-hover', true) },
|
onHover: () => { barStatusIcons.toggleClassName('bar-statusicons-hover', true) },
|
||||||
onHoverLost: () => { barStatusIcons.toggleClassName('bar-statusicons-hover', false) },
|
onHoverLost: () => { barStatusIcons.toggleClassName('bar-statusicons-hover', false) },
|
||||||
onPrimaryClick: () => App.toggleWindow('sideright'),
|
onPrimaryClick: () => App.toggleWindow('sideright'),
|
||||||
@@ -79,10 +67,24 @@ export default () => {
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
return Widget.Box({
|
return Widget.EventBox({
|
||||||
children: [
|
onScrollUp: () => {
|
||||||
actualContent,
|
if (!Audio.speaker) return;
|
||||||
Widget.Box({ className: 'bar-corner-spacing' }),
|
if (Audio.speaker.volume <= 0.09) Audio.speaker.volume += 0.01;
|
||||||
]
|
else Audio.speaker.volume += 0.03;
|
||||||
|
Indicator.popup(1);
|
||||||
|
},
|
||||||
|
onScrollDown: () => {
|
||||||
|
if (!Audio.speaker) return;
|
||||||
|
if (Audio.speaker.volume <= 0.09) Audio.speaker.volume -= 0.01;
|
||||||
|
else Audio.speaker.volume -= 0.03;
|
||||||
|
Indicator.popup(1);
|
||||||
|
},
|
||||||
|
child: Widget.Box({
|
||||||
|
children: [
|
||||||
|
actualContent,
|
||||||
|
SpaceRightDefaultClicks(Widget.Box({ className: 'bar-corner-spacing' })),
|
||||||
|
]
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user