mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
fix bar volume scrolling
This commit is contained in:
parent
03ec2616df
commit
90215d6451
1 changed files with 19 additions and 17 deletions
|
|
@ -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' })),
|
||||||
|
]
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue