forked from Shinonome/dots-hyprland
volume scroll: more precise control in single-digits
This commit is contained in:
@@ -58,12 +58,14 @@ export default () => {
|
|||||||
return Widget.EventBox({
|
return Widget.EventBox({
|
||||||
onScrollUp: () => {
|
onScrollUp: () => {
|
||||||
if (!Audio.speaker) return;
|
if (!Audio.speaker) return;
|
||||||
Audio.speaker.volume += 0.03;
|
if(Audio.speaker.volume <= 0.09) Audio.speaker.volume += 0.01;
|
||||||
|
else Audio.speaker.volume += 0.03;
|
||||||
Indicator.popup(1);
|
Indicator.popup(1);
|
||||||
},
|
},
|
||||||
onScrollDown: () => {
|
onScrollDown: () => {
|
||||||
if (!Audio.speaker) return;
|
if (!Audio.speaker) return;
|
||||||
Audio.speaker.volume -= 0.03;
|
if(Audio.speaker.volume <= 0.09) Audio.speaker.volume -= 0.01;
|
||||||
|
else Audio.speaker.volume -= 0.03;
|
||||||
Indicator.popup(1);
|
Indicator.popup(1);
|
||||||
},
|
},
|
||||||
onHover: () => { barStatusIcons.toggleClassName('bar-statusicons-hover', true) },
|
onHover: () => { barStatusIcons.toggleClassName('bar-statusicons-hover', true) },
|
||||||
|
|||||||
Reference in New Issue
Block a user