diff --git a/Cargo.lock b/Cargo.lock index 02cf28de..1165d6b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4104,6 +4104,7 @@ version = "0.3.0" dependencies = [ "nih_plug", "nih_plug_vizia", + "open", "realfft", ] diff --git a/plugins/spectral_compressor/Cargo.toml b/plugins/spectral_compressor/Cargo.toml index 3292a9f2..428e8415 100644 --- a/plugins/spectral_compressor/Cargo.toml +++ b/plugins/spectral_compressor/Cargo.toml @@ -14,3 +14,6 @@ nih_plug = { path = "../../", features = ["assert_process_allocs"] } nih_plug_vizia = { path = "../../nih_plug_vizia" } realfft = "3.0" + +# For the GUI +open = "3.0" diff --git a/plugins/spectral_compressor/src/editor.rs b/plugins/spectral_compressor/src/editor.rs index 144b99da..b03526c9 100644 --- a/plugins/spectral_compressor/src/editor.rs +++ b/plugins/spectral_compressor/src/editor.rs @@ -60,7 +60,15 @@ pub(crate) fn create( .font_family(vec![FamilyOwned::Name(String::from( assets::NOTO_SANS_THIN, ))]) - .font_size(30.0); + .font_size(30.0) + .on_mouse_down(|_, _| { + // Try to open the plugin's page when clicking on the title. If this fails + // then that's not a problem + let result = open::that(SpectralCompressor::URL); + if cfg!(debug) && result.is_err() { + nih_debug_assert_failure!("Failed to open web browser: {:?}", result); + } + }); Label::new(cx, SpectralCompressor::VERSION) .color(DARKER_GRAY) .top(Stretch(1.0))