Upgrade Vizia for the cosmic-text changes

This brings some breaking changes, and vertical positioning of text may
have changed slightly.
This commit is contained in:
Robbert van der Helm
2023-01-12 18:49:55 +01:00
parent e5a26ac199
commit bb521fcb82
14 changed files with 266 additions and 131 deletions

View File

@@ -86,7 +86,9 @@ pub(crate) fn create(editor_data: Data, editor_state: Arc<ViziaState>) -> Option
fn top_bar(cx: &mut Context) {
HStack::new(cx, |cx| {
Label::new(cx, "Diopser")
.font(assets::NOTO_SANS_THIN)
.font_family(vec![FamilyOwned::Name(String::from(
assets::NOTO_SANS_THIN,
))])
.font_size(37.0)
.top(Pixels(-2.0))
.left(Pixels(8.0))

View File

@@ -4,7 +4,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use nih_plug::prelude::Param;
use nih_plug_vizia::vizia::prelude::EventContext;
use nih_plug_vizia::vizia::prelude::*;
use nih_plug_vizia::widgets::ParamEvent;
use crate::params::{self, DiopserParams};