From 522e0b885df14728d123d450222cf632957d3446 Mon Sep 17 00:00:00 2001 From: plule <630159+plule@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:11:34 +0100 Subject: [PATCH] Fix volume display missing --- theremotion-ui/ui/state.slint | 18 +----------------- theremotion/src/thread_ui.rs | 6 +----- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/theremotion-ui/ui/state.slint b/theremotion-ui/ui/state.slint index 7596e4c..2139048 100644 --- a/theremotion-ui/ui/state.slint +++ b/theremotion-ui/ui/state.slint @@ -80,23 +80,7 @@ export global UIState { callback rh-clicked; - // DSP Controls - in property lead-volume-control: {min: 0, max: 1}; - in-out property lead-volume; - callback lead-volume-changed(float); - - in property cutoff-note-control: {min: 0, max: 1}; - in-out property cutoff-note; - callback cutoff-note-changed(float); - - in property resonance-control: {min: 0, max: 1}; - in-out property resonance; - callback resonance-changed(float); - - in property pluck-mute-control: {min: 0, max: 1}; - in-out property pluck-mute; - callback pluck-mute-changed(float); - + // DSP Controls in property drone-detune-control: {min: 0, max: 1}; in-out property drone-detune; callback drone-detune-changed(float); diff --git a/theremotion/src/thread_ui.rs b/theremotion/src/thread_ui.rs index d6782d6..67899b1 100644 --- a/theremotion/src/thread_ui.rs +++ b/theremotion/src/thread_ui.rs @@ -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(); @@ -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));