disable default keyboard/mouse events

for gain sliders
This commit is contained in:
onyx-and-iris 2023-09-26 13:33:13 +01:00
parent ef10b224d7
commit 7262af4bcf
2 changed files with 7 additions and 1 deletions

View File

@ -320,6 +320,7 @@ class Builder:
disable_number_display=True, disable_number_display=True,
expand_x=True, expand_x=True,
enable_events=True, enable_events=True,
disabled=True,
orientation="horizontal", orientation="horizontal",
key=f"STRIP {i}||SLIDER GAIN", key=f"STRIP {i}||SLIDER GAIN",
), ),
@ -412,6 +413,7 @@ class Builder:
disable_number_display=True, disable_number_display=True,
expand_x=True, expand_x=True,
enable_events=True, enable_events=True,
disabled=True,
orientation="horizontal", orientation="horizontal",
key=f"STRIP {i}||SLIDER GAIN", key=f"STRIP {i}||SLIDER GAIN",
), ),
@ -491,6 +493,7 @@ class Builder:
def add_gain_slider(layout): def add_gain_slider(layout):
layout.append( layout.append(
[ [
psg.Text("Gain"),
psg.Slider( psg.Slider(
range=(-60, 12), range=(-60, 12),
default_value=self.vm.bus[i].gain, default_value=self.vm.bus[i].gain,
@ -498,9 +501,10 @@ class Builder:
disable_number_display=True, disable_number_display=True,
expand_x=True, expand_x=True,
enable_events=True, enable_events=True,
disabled=True,
orientation="horizontal", orientation="horizontal",
key=f"BUS {i}||SLIDER GAIN", key=f"BUS {i}||SLIDER GAIN",
) ),
] ]
) )

View File

@ -56,6 +56,7 @@ class CompSlider(psg.Slider):
"range": (-24, 24), "range": (-24, 24),
"default_value": self.vm.strip[self.index].comp.gainin, "default_value": self.vm.strip[self.index].comp.gainin,
"resolution": 0.1, "resolution": 0.1,
"disabled": True,
"key": f"COMPRESSOR||SLIDER {param}", "key": f"COMPRESSOR||SLIDER {param}",
} }
case "RATIO": case "RATIO":
@ -98,6 +99,7 @@ class CompSlider(psg.Slider):
"range": (-24, 24), "range": (-24, 24),
"default_value": self.vm.strip[self.index].comp.gainout, "default_value": self.vm.strip[self.index].comp.gainout,
"resolution": 0.01, "resolution": 0.01,
"disabled": True,
"key": f"COMPRESSOR||SLIDER {param}", "key": f"COMPRESSOR||SLIDER {param}",
} }