1
0
Fork 0

Make the Spectral Compressor title link to GitHub

This commit is contained in:
Robbert van der Helm 2023-01-16 01:18:32 +01:00
parent 77cbef5f82
commit cf52d60a61
3 changed files with 13 additions and 1 deletions

1
Cargo.lock generated
View file

@ -4104,6 +4104,7 @@ version = "0.3.0"
dependencies = [ dependencies = [
"nih_plug", "nih_plug",
"nih_plug_vizia", "nih_plug_vizia",
"open",
"realfft", "realfft",
] ]

View file

@ -14,3 +14,6 @@ nih_plug = { path = "../../", features = ["assert_process_allocs"] }
nih_plug_vizia = { path = "../../nih_plug_vizia" } nih_plug_vizia = { path = "../../nih_plug_vizia" }
realfft = "3.0" realfft = "3.0"
# For the GUI
open = "3.0"

View file

@ -60,7 +60,15 @@ pub(crate) fn create(
.font_family(vec![FamilyOwned::Name(String::from( .font_family(vec![FamilyOwned::Name(String::from(
assets::NOTO_SANS_THIN, 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) Label::new(cx, SpectralCompressor::VERSION)
.color(DARKER_GRAY) .color(DARKER_GRAY)
.top(Stretch(1.0)) .top(Stretch(1.0))