From 73744bf8fe2b1245530d8dd9e176d0402e89a685 Mon Sep 17 00:00:00 2001 From: Nick Oates Date: Sat, 12 Oct 2024 17:07:44 -0700 Subject: [PATCH] VolumeScroll: Always change by 10% --- README.md | 2 +- plugins/VolumeScroll/package.json | 2 +- plugins/VolumeScroll/src/index.ts | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 15c1a2f..b4f52a4 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ https://inrixia.github.io/neptune-plugins/VolumeScroll ``` -Lets you scroll on the volume icon to change the volume by 2%. Hold shift to change by 10%. +Lets you scroll on the volume icon to change the volume by 10%. ![image](https://github.com/user-attachments/assets/3a795666-2ed3-4feb-8d42-9374d4f6edd3) diff --git a/plugins/VolumeScroll/package.json b/plugins/VolumeScroll/package.json index 361287b..f0e589e 100644 --- a/plugins/VolumeScroll/package.json +++ b/plugins/VolumeScroll/package.json @@ -1,6 +1,6 @@ { "displayName": "Volume Scroll", - "description": "Scroll on the volume button to change it. (Hold shift to change by 10%)", + "description": "Scroll on the volume button to change it.", "author": "Nick Oates", "main": "./src/index.js" } diff --git a/plugins/VolumeScroll/src/index.ts b/plugins/VolumeScroll/src/index.ts index fba1546..923ec07 100644 --- a/plugins/VolumeScroll/src/index.ts +++ b/plugins/VolumeScroll/src/index.ts @@ -3,8 +3,7 @@ import { actions, intercept, store } from "@neptune"; function onScroll(event: WheelEvent) { if (!event.deltaY) return; const { playbackControls } = store.getState(); - const increment = event.shiftKey ? 10 : 2; - const volumeChange = event.deltaY > 0 ? -increment : increment; + const volumeChange = event.deltaY > 0 ? -10 : 10; const newVolume = playbackControls.volume + volumeChange; const clampVolume = Math.min(100, Math.max(0, newVolume)); actions.playbackControls.setVolume({