mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 13:24:48 +00:00
Prepare the path element setup in the run-time for extensibility
Make the anonymous struct for the LineTo variant in the PathElement enum as separate structure, which can be introspected using rtto::FieldInfo.
This commit is contained in:
parent
9d9779ecde
commit
1ab71b8ca3
8 changed files with 39 additions and 22 deletions
|
@ -1,7 +1,7 @@
|
|||
use core::cell::RefCell;
|
||||
use neon::prelude::*;
|
||||
use sixtyfps_compilerlib::typeregister::Type;
|
||||
use sixtyfps_corelib::abi::datastructures::{PathElement, Resource};
|
||||
use sixtyfps_corelib::abi::datastructures::{PathElement, PathLineTo, Resource};
|
||||
use sixtyfps_corelib::{ComponentRefPin, EvaluationContext};
|
||||
|
||||
use std::rc::Rc;
|
||||
|
@ -161,7 +161,7 @@ fn to_js_value<'cx>(
|
|||
let element_object = JsObject::new(cx);
|
||||
|
||||
match element {
|
||||
PathElement::LineTo { x, y } => {
|
||||
PathElement::LineTo(PathLineTo { x, y }) => {
|
||||
let x = JsNumber::new(cx, *x);
|
||||
let x = x.as_value(cx);
|
||||
element_object.set(cx, "x", x)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue