Replace create_vizia_editor_without_theme w/ enum

This involves a small breaking change. You can now also completely
disable all of Vizia's theming.
This commit is contained in:
Robbert van der Helm
2022-11-06 13:26:32 +01:00
parent 542b3052f2
commit 89c2b1f84e
7 changed files with 53 additions and 48 deletions

View File

@@ -2,7 +2,7 @@ use atomic_float::AtomicF32;
use nih_plug::prelude::{util, Editor};
use nih_plug_vizia::vizia::prelude::*;
use nih_plug_vizia::widgets::*;
use nih_plug_vizia::{assets, create_vizia_editor, ViziaState};
use nih_plug_vizia::{assets, create_vizia_editor, ViziaState, ViziaTheming};
use std::sync::atomic::Ordering;
use std::sync::Arc;
use std::time::Duration;
@@ -32,7 +32,7 @@ pub(crate) fn create(
peak_meter: Arc<AtomicF32>,
editor_state: Arc<ViziaState>,
) -> Option<Box<dyn Editor>> {
create_vizia_editor(editor_state, move |cx, _| {
create_vizia_editor(editor_state, ViziaTheming::Custom, move |cx, _| {
cx.add_theme(STYLE);
Data {