Skip to content

Commit

Permalink
跟进 #14#15。具体看任务列表
Browse files Browse the repository at this point in the history
  • Loading branch information
Fancyflame committed Oct 5, 2024
1 parent 602b20c commit c2382dd
Show file tree
Hide file tree
Showing 34 changed files with 303 additions and 1,638 deletions.
6 changes: 0 additions & 6 deletions examples/simple_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ impl App {
Rectangle {
force_color <= color.to_wire(),
force_height <= force_height.clone(),
@style: style! {
in window_backend::sty {
Width: 50px;
Height: 70px + 40px * *index.read() as f32;
}
},
@on_create: move |access| {
access.listen().spawn(move |_: PointerMove| {
force_height.set(Some(rand::thread_rng().gen_range(50.0..200.0)));
Expand Down
22 changes: 0 additions & 22 deletions examples/window_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ use irisia::{
user_props, Event, Result, WriteStyle,
};

pub mod sty {
use irisia::{primitive::Length, Style};

#[derive(Style, Clone, Copy, PartialEq)]
pub struct Color(pub irisia::skia_safe::Color);

#[derive(Style, Clone, Copy, PartialEq)]
#[style(all)]
pub struct Width(pub Length);

#[derive(Style, Clone, Copy, PartialEq)]
#[style(all)]
pub struct Height(pub Length);
}

pub struct Rectangle {
is_force: bool,
props: RectProps,
Expand All @@ -39,13 +24,6 @@ pub struct RectProps {
pub force_height: Option<f32>,
}

#[derive(Default, WriteStyle)]
struct RectStyles {
width: Option<sty::Width>,
height: Option<sty::Height>,
color: Option<sty::Color>,
}

impl ElementInterfaces for Rectangle {
type Props<'a> = RectProps;
const REQUIRE_INDEPENDENT_LAYER: bool = false;
Expand Down
76 changes: 0 additions & 76 deletions irisia-macros/src/derive_read_style.rs

This file was deleted.

43 changes: 0 additions & 43 deletions irisia-macros/src/derive_style/mod.rs

This file was deleted.

Loading

0 comments on commit c2382dd

Please sign in to comment.