mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
wip: big flat pt.12, down to 1 error
This commit is contained in:
parent
b718e54d33
commit
e21ef1af94
9 changed files with 53 additions and 30 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use crate::*;
|
||||
use std::sync::{Arc, atomic::AtomicUsize};
|
||||
use std::sync::{Arc, atomic::{AtomicUsize, Ordering::Relaxed}};
|
||||
|
||||
impl Direction {
|
||||
pub fn is_north (&self) -> bool { matches!(self, Self::North) }
|
||||
|
|
@ -46,6 +46,14 @@ pub struct Measure<E: Engine> {
|
|||
pub y: Arc<AtomicUsize>,
|
||||
}
|
||||
|
||||
render!(Measure<E>
|
||||
|self, layout|Ok(Some(layout)),
|
||||
|self, render|{
|
||||
self.x.store(render.area().w().into(), Relaxed);
|
||||
self.y.store(render.area().h().into(), Relaxed);
|
||||
Ok(())
|
||||
});
|
||||
|
||||
impl<E: Engine> Clone for Measure<E> {
|
||||
fn clone (&self) -> Self {
|
||||
Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue