From 61bbe5ba4629523d85a46d726e683d005b93de98 Mon Sep 17 00:00:00 2001 From: ardura Date: Wed, 21 Aug 2024 08:24:26 -0700 Subject: [PATCH] fix some fades and update egui_baseview from nih_plug --- Cargo.lock | 36 ++++++++++++++++++++++--------- Cargo.toml | 6 +++--- src/CustomWidgets/BeizerButton.rs | 2 ++ src/actuate_gui.rs | 2 ++ 4 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 84f07e6..8aded5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,8 +11,8 @@ dependencies = [ "flate2", "hound", "lazy_static", - "nih_plug 0.0.0 (git+https://github.com/ardura/nih-plug.git?rev=9d9d5f9710daeadfb2eba3859088b4bea196b904)", - "nih_plug_egui 0.0.0 (git+https://github.com/ardura/nih-plug.git?rev=9d9d5f9710daeadfb2eba3859088b4bea196b904)", + "nih_plug 0.0.0 (git+https://github.com/ardura/nih-plug.git?rev=30502a623d1eef5eed4e043a1977baddf4cb6343)", + "nih_plug_egui 0.0.0 (git+https://github.com/ardura/nih-plug.git?rev=30502a623d1eef5eed4e043a1977baddf4cb6343)", "num-complex", "num-traits", "once_cell", @@ -468,6 +468,22 @@ dependencies = [ "nohash-hasher", ] +[[package]] +name = "egui-baseview" +version = "0.2.0" +source = "git+https://github.com/ardura/egui-baseview.git?rev=0af46f14ff6f1cc18ef6feb9d62e278935079ba2#0af46f14ff6f1cc18ef6feb9d62e278935079ba2" +dependencies = [ + "baseview", + "copypasta", + "egui", + "egui_glow", + "keyboard-types", + "log", + "open", + "raw-window-handle", + "thiserror", +] + [[package]] name = "egui-baseview" version = "0.2.0" @@ -487,7 +503,7 @@ dependencies = [ [[package]] name = "egui_file" version = "0.18.0" -source = "git+https://github.com/ardura/egui_file.git?rev=72d857a3689e34f1098e0a4435a82e04746ea9f7#72d857a3689e34f1098e0a4435a82e04746ea9f7" +source = "git+https://github.com/ardura/egui_file.git?rev=eabe829cbaab41eebe6fbe19797d0fbbea23be7d#eabe829cbaab41eebe6fbe19797d0fbbea23be7d" dependencies = [ "nih_plug_egui 0.0.0 (git+https://github.com/ardura/nih-plug.git?rev=dcbcf2a7e3f013cfa5f2b63e1a65ae16122d5535)", ] @@ -812,7 +828,7 @@ dependencies = [ [[package]] name = "nih_plug" version = "0.0.0" -source = "git+https://github.com/ardura/nih-plug.git?rev=9d9d5f9710daeadfb2eba3859088b4bea196b904#9d9d5f9710daeadfb2eba3859088b4bea196b904" +source = "git+https://github.com/ardura/nih-plug.git?rev=30502a623d1eef5eed4e043a1977baddf4cb6343#30502a623d1eef5eed4e043a1977baddf4cb6343" dependencies = [ "anyhow", "anymap", @@ -830,7 +846,7 @@ dependencies = [ "log", "midi-consts", "nih_log", - "nih_plug_derive 0.1.0 (git+https://github.com/ardura/nih-plug.git?rev=9d9d5f9710daeadfb2eba3859088b4bea196b904)", + "nih_plug_derive 0.1.0 (git+https://github.com/ardura/nih-plug.git?rev=30502a623d1eef5eed4e043a1977baddf4cb6343)", "objc", "parking_lot", "raw-window-handle", @@ -874,7 +890,7 @@ dependencies = [ [[package]] name = "nih_plug_derive" version = "0.1.0" -source = "git+https://github.com/ardura/nih-plug.git?rev=9d9d5f9710daeadfb2eba3859088b4bea196b904#9d9d5f9710daeadfb2eba3859088b4bea196b904" +source = "git+https://github.com/ardura/nih-plug.git?rev=30502a623d1eef5eed4e043a1977baddf4cb6343#30502a623d1eef5eed4e043a1977baddf4cb6343" dependencies = [ "proc-macro2", "quote", @@ -894,13 +910,13 @@ dependencies = [ [[package]] name = "nih_plug_egui" version = "0.0.0" -source = "git+https://github.com/ardura/nih-plug.git?rev=9d9d5f9710daeadfb2eba3859088b4bea196b904#9d9d5f9710daeadfb2eba3859088b4bea196b904" +source = "git+https://github.com/ardura/nih-plug.git?rev=30502a623d1eef5eed4e043a1977baddf4cb6343#30502a623d1eef5eed4e043a1977baddf4cb6343" dependencies = [ "baseview", "crossbeam", - "egui-baseview", + "egui-baseview 0.2.0 (git+https://github.com/ardura/egui-baseview.git?rev=0af46f14ff6f1cc18ef6feb9d62e278935079ba2)", "lazy_static", - "nih_plug 0.0.0 (git+https://github.com/ardura/nih-plug.git?rev=9d9d5f9710daeadfb2eba3859088b4bea196b904)", + "nih_plug 0.0.0 (git+https://github.com/ardura/nih-plug.git?rev=30502a623d1eef5eed4e043a1977baddf4cb6343)", "parking_lot", "raw-window-handle", "serde", @@ -913,7 +929,7 @@ source = "git+https://github.com/ardura/nih-plug.git?rev=dcbcf2a7e3f013cfa5f2b63 dependencies = [ "baseview", "crossbeam", - "egui-baseview", + "egui-baseview 0.2.0 (git+https://github.com/ardura/egui-baseview.git?rev=bfb062bdda0c3bb38018b1338b78687be4e4a596)", "lazy_static", "nih_plug 0.0.0 (git+https://github.com/ardura/nih-plug.git?rev=dcbcf2a7e3f013cfa5f2b63e1a65ae16122d5535)", "parking_lot", diff --git a/Cargo.toml b/Cargo.toml index e86d139..168eb77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,11 +19,11 @@ hound = "3.5.0" lazy_static = "1.4.0" # Nih plug update -nih_plug = { git = "https://github.com/ardura/nih-plug.git", rev = "9d9d5f9710daeadfb2eba3859088b4bea196b904", features = ["assert_process_allocs"] } -nih_plug_egui = { git = "https://github.com/ardura/nih-plug.git", rev = "9d9d5f9710daeadfb2eba3859088b4bea196b904" } +nih_plug = { git = "https://github.com/ardura/nih-plug.git", rev = "30502a623d1eef5eed4e043a1977baddf4cb6343", features = ["assert_process_allocs"] } +nih_plug_egui = { git = "https://github.com/ardura/nih-plug.git", rev = "30502a623d1eef5eed4e043a1977baddf4cb6343" } # egui_file fork for nih-plug/Actuate -egui_file = { git = "https://github.com/ardura/egui_file.git", rev = "72d857a3689e34f1098e0a4435a82e04746ea9f7" } +egui_file = { git = "https://github.com/ardura/egui_file.git", rev = "eabe829cbaab41eebe6fbe19797d0fbbea23be7d" } num-complex = "0.4.4" num-traits = "0.2.17" diff --git a/src/CustomWidgets/BeizerButton.rs b/src/CustomWidgets/BeizerButton.rs index 037e262..c909530 100644 --- a/src/CustomWidgets/BeizerButton.rs +++ b/src/CustomWidgets/BeizerButton.rs @@ -9,6 +9,8 @@ use nih_plug_egui::egui::{ Align2, Color32, FontId, Pos2, Rect, Response, Rounding, Shape, Stroke, Ui, Vec2, Widget, }; +// This allow is here since Actuate ended up only using HorizontalInline +#[allow(dead_code)] pub enum ButtonLayout { HorizontalInline, Vertical, diff --git a/src/actuate_gui.rs b/src/actuate_gui.rs index 2769ee1..cf41099 100644 --- a/src/actuate_gui.rs +++ b/src/actuate_gui.rs @@ -446,6 +446,8 @@ pub(crate) fn make_actuate_gui(instance: &mut Actuate, _async_executor: AsyncExe (HEIGHT as f32/ 2.0) - 250.0)) .fixed_size(Vec2::new(660.0, 500.0)) .scroll([true, true]) + .fade_in(false) + .fade_out(false) .enabled(true); window.show(egui_ctx, |ui| { ui.visuals_mut().extreme_bg_color = Color32::DARK_GRAY;