Update Vizia fork
This commit is contained in:
parent
dedbfebb71
commit
482c834450
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -3498,7 +3498,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vizia"
|
name = "vizia"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/robbert-vdh/vizia.git?branch=patched#163ae29c603c51371a8a98cca3f4434f7bf38d37"
|
source = "git+https://github.com/robbert-vdh/vizia.git?branch=patched#44d6895c8a551771f7ed88add32bca435d68d879"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"vizia_baseview",
|
"vizia_baseview",
|
||||||
"vizia_core",
|
"vizia_core",
|
||||||
|
@ -3507,7 +3507,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vizia_baseview"
|
name = "vizia_baseview"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/robbert-vdh/vizia.git?branch=patched#163ae29c603c51371a8a98cca3f4434f7bf38d37"
|
source = "git+https://github.com/robbert-vdh/vizia.git?branch=patched#44d6895c8a551771f7ed88add32bca435d68d879"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"baseview 0.1.0 (git+https://github.com/robbert-vdh/baseview.git?branch=feature/resize)",
|
"baseview 0.1.0 (git+https://github.com/robbert-vdh/baseview.git?branch=feature/resize)",
|
||||||
"femtovg",
|
"femtovg",
|
||||||
|
@ -3519,7 +3519,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vizia_core"
|
name = "vizia_core"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/robbert-vdh/vizia.git?branch=patched#163ae29c603c51371a8a98cca3f4434f7bf38d37"
|
source = "git+https://github.com/robbert-vdh/vizia.git?branch=patched#44d6895c8a551771f7ed88add32bca435d68d879"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"copypasta",
|
"copypasta",
|
||||||
|
@ -3544,7 +3544,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vizia_derive"
|
name = "vizia_derive"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/robbert-vdh/vizia.git?branch=patched#163ae29c603c51371a8a98cca3f4434f7bf38d37"
|
source = "git+https://github.com/robbert-vdh/vizia.git?branch=patched#44d6895c8a551771f7ed88add32bca435d68d879"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
|
@ -5,7 +5,7 @@ use crossbeam::atomic::AtomicCell;
|
||||||
use nih_plug::prelude::{Editor, GuiContext, ParentWindowHandle};
|
use nih_plug::prelude::{Editor, GuiContext, ParentWindowHandle};
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use vizia::{Application, Color, Context, Entity, Model, PropSet, WindowDescription};
|
use vizia::{Application, Color, Context, Entity, Model, PropSet};
|
||||||
|
|
||||||
// Re-export for convenience
|
// Re-export for convenience
|
||||||
pub use vizia;
|
pub use vizia;
|
||||||
|
@ -153,11 +153,8 @@ impl Editor for ViziaEditor {
|
||||||
let (unscaled_width, unscaled_height) = vizia_state.inner_logical_size();
|
let (unscaled_width, unscaled_height) = vizia_state.inner_logical_size();
|
||||||
let system_scaling_factor = self.scaling_factor.load();
|
let system_scaling_factor = self.scaling_factor.load();
|
||||||
let user_scale_factor = vizia_state.user_scale_factor();
|
let user_scale_factor = vizia_state.user_scale_factor();
|
||||||
let window_description = WindowDescription::new()
|
|
||||||
.with_inner_size(unscaled_width, unscaled_height)
|
|
||||||
.with_scale_factor(user_scale_factor);
|
|
||||||
|
|
||||||
let window = Application::new(window_description, move |cx| {
|
let window = Application::new(move |cx| {
|
||||||
// Set some default styles to match the iced integration
|
// Set some default styles to match the iced integration
|
||||||
if apply_theming {
|
if apply_theming {
|
||||||
// NOTE: vizia's font rendering looks way too dark and thick. Going one font weight
|
// NOTE: vizia's font rendering looks way too dark and thick. Going one font weight
|
||||||
|
@ -199,6 +196,8 @@ impl Editor for ViziaEditor {
|
||||||
.map(|factor| WindowScalePolicy::ScaleFactor(factor as f64))
|
.map(|factor| WindowScalePolicy::ScaleFactor(factor as f64))
|
||||||
.unwrap_or(WindowScalePolicy::SystemScaleFactor),
|
.unwrap_or(WindowScalePolicy::SystemScaleFactor),
|
||||||
)
|
)
|
||||||
|
.inner_size((unscaled_width, unscaled_height))
|
||||||
|
.user_scale_factor(user_scale_factor)
|
||||||
.open_parented(&parent);
|
.open_parented(&parent);
|
||||||
|
|
||||||
self.vizia_state.open.store(true, Ordering::Release);
|
self.vizia_state.open.store(true, Ordering::Release);
|
||||||
|
|
Loading…
Reference in a new issue