mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Update Vizia
This commit is contained in:
@@ -17,5 +17,6 @@ crossbeam = "0.8"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
# This fork contains some additional patches on top of Vizia to make it more
|
||||
# suitable for use in NIH-plug. The set of patches constantly changes as things
|
||||
# are merged into upstream Vizia.
|
||||
# are merged into upstream Vizia. This also excludes the `embedded_fonts`
|
||||
# feature.
|
||||
vizia = { git = "https://github.com/robbert-vdh/vizia.git", branch = "patched", default_features = false, features = ["baseview", "clipboard", "x11"] }
|
||||
|
||||
@@ -5,6 +5,7 @@ use crossbeam::atomic::AtomicCell;
|
||||
use nih_plug::prelude::{Editor, GuiContext, ParentWindowHandle};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use vizia::context::backend::TextConfig;
|
||||
use vizia::prelude::*;
|
||||
|
||||
use crate::widgets::RawParamEvent;
|
||||
@@ -81,6 +82,10 @@ impl Editor for ViziaEditor {
|
||||
)
|
||||
.inner_size((unscaled_width, unscaled_height))
|
||||
.user_scale_factor(user_scale_factor)
|
||||
.with_text_config(TextConfig {
|
||||
hint: false,
|
||||
subpixel: true,
|
||||
})
|
||||
.on_idle({
|
||||
let emit_parameters_changed_event = self.emit_parameters_changed_event.clone();
|
||||
move |cx| {
|
||||
|
||||
@@ -43,7 +43,7 @@ impl View for ResizeHandle {
|
||||
fn event(&mut self, cx: &mut EventContext, event: &mut Event) {
|
||||
event.map(|window_event, meta| match *window_event {
|
||||
WindowEvent::MouseDown(MouseButton::Left) => {
|
||||
// The handle is a triangle, so we should also interac twith it as if it was a
|
||||
// The handle is a triangle, so we should also interact with it as if it was a
|
||||
// triangle
|
||||
if intersects_triangle(
|
||||
cx.cache.get_bounds(cx.current()),
|
||||
|
||||
Reference in New Issue
Block a user