Get everything rendering again

This commit is contained in:
Nathan Sobo
2023-10-16 20:15:24 +02:00
parent 5e43c332f1
commit 1a3650ef2a
4 changed files with 12 additions and 43 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ use crate::{
group_bounds, AnyElement, DispatchPhase, Element, IntoAnyElement, MouseMoveEvent, SharedString,
Style, StyleCascade, StyleRefinement,
};
use refineable::CascadeSlot;
use refineable::{CascadeSlot, Refineable};
use smallvec::SmallVec;
use std::sync::{
atomic::{AtomicBool, Ordering::SeqCst},
@@ -237,7 +237,7 @@ impl<V: 'static + Send + Sync> Styled for LayoutNodeState<V> {
fn computed_style(&mut self) -> &Style {
self.computed_style
.get_or_insert_with(|| Style::from(self.style_cascade.merged()))
.get_or_insert_with(|| Style::default().refined(self.style_cascade.merged()))
}
}
+1 -4
View File
@@ -7,10 +7,7 @@ pub trait Styled {
fn declared_style(&mut self) -> &mut <Self::Style as Refineable>::Refinement;
fn computed_style(&mut self) -> Self::Style {
todo!()
// let x: StyleRefinement = self.style_cascade().merged();
// x.into();
Self::Style::default().refined(self.style_cascade().merged())
}
fn hover(self) -> Hoverable<Self>