From 7262af4bcf65e46ee458e203ad5061efbbc5c4d3 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Tue, 26 Sep 2023 13:33:13 +0100 Subject: [PATCH] disable default keyboard/mouse events for gain sliders --- src/nvda_voicemeeter/builder.py | 6 +++++- src/nvda_voicemeeter/compound.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/nvda_voicemeeter/builder.py b/src/nvda_voicemeeter/builder.py index 7df774a..9036e70 100644 --- a/src/nvda_voicemeeter/builder.py +++ b/src/nvda_voicemeeter/builder.py @@ -320,6 +320,7 @@ class Builder: disable_number_display=True, expand_x=True, enable_events=True, + disabled=True, orientation="horizontal", key=f"STRIP {i}||SLIDER GAIN", ), @@ -412,6 +413,7 @@ class Builder: disable_number_display=True, expand_x=True, enable_events=True, + disabled=True, orientation="horizontal", key=f"STRIP {i}||SLIDER GAIN", ), @@ -491,6 +493,7 @@ class Builder: def add_gain_slider(layout): layout.append( [ + psg.Text("Gain"), psg.Slider( range=(-60, 12), default_value=self.vm.bus[i].gain, @@ -498,9 +501,10 @@ class Builder: disable_number_display=True, expand_x=True, enable_events=True, + disabled=True, orientation="horizontal", key=f"BUS {i}||SLIDER GAIN", - ) + ), ] ) diff --git a/src/nvda_voicemeeter/compound.py b/src/nvda_voicemeeter/compound.py index 884a8de..2d6bd0f 100644 --- a/src/nvda_voicemeeter/compound.py +++ b/src/nvda_voicemeeter/compound.py @@ -56,6 +56,7 @@ class CompSlider(psg.Slider): "range": (-24, 24), "default_value": self.vm.strip[self.index].comp.gainin, "resolution": 0.1, + "disabled": True, "key": f"COMPRESSOR||SLIDER {param}", } case "RATIO": @@ -98,6 +99,7 @@ class CompSlider(psg.Slider): "range": (-24, 24), "default_value": self.vm.strip[self.index].comp.gainout, "resolution": 0.01, + "disabled": True, "key": f"COMPRESSOR||SLIDER {param}", }