Skip to content

Commit

Permalink
Fix volume display missing
Browse files Browse the repository at this point in the history
  • Loading branch information
plule committed Nov 6, 2023
1 parent 84b790f commit 522e0b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
18 changes: 1 addition & 17 deletions theremotion-ui/ui/state.slint
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,7 @@ export global UIState {
callback rh-clicked;


// DSP Controls
in property <DspControl> lead-volume-control: {min: 0, max: 1};
in-out property <float> lead-volume;
callback lead-volume-changed(float);

in property <DspControl> cutoff-note-control: {min: 0, max: 1};
in-out property <float> cutoff-note;
callback cutoff-note-changed(float);

in property <DspControl> resonance-control: {min: 0, max: 1};
in-out property <float> resonance;
callback resonance-changed(float);

in property <DspControl> pluck-mute-control: {min: 0, max: 1};
in-out property <float> pluck-mute;
callback pluck-mute-changed(float);

// DSP Controls
in property <DspControl> drone-detune-control: {min: 0, max: 1};
in-out property <float> drone-detune;
callback drone-detune-changed(float);
Expand Down
6 changes: 1 addition & 5 deletions theremotion/src/thread_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ fn read_updates(
ui.set_status(theremotion_ui::Status::Error);
ui.set_status_message(text.into());
}
Msg::LeadVolume(v) => ui.set_lead_volume(v),
Msg::LeadVolume(v) => ui.set_volume(v),
Msg::Lead(notes, coords) => {
let coords_direction = coords.normalize();
let range_end = *settings.current_preset.note_range_f().end();
Expand Down Expand Up @@ -272,10 +272,6 @@ fn read_updates(
}

fn set_ui_controls(ui: &theremotion_ui::UIState<'_>, controls: Controls) {
ui.set_lead_volume_control(ui_control(&controls.lead_volume));
ui.set_cutoff_note_control(ui_control(&controls.cutoff_note));
ui.set_resonance_control(ui_control(&controls.resonance));
ui.set_pluck_mute_control(ui_control(&controls.pluck_mute));
ui.set_drone_detune_control(ui_control(&controls.drone_detune));
ui.set_echo_mix_control(ui_control(&controls.echo_mix));
ui.set_echo_duration_control(ui_control(&controls.echo_duration));
Expand Down

0 comments on commit 522e0b8

Please sign in to comment.