Moved Frame struct into element context, to be close to it's associated methods

This commit is contained in:
Mikayla 2024-01-21 20:52:24 -08:00
parent c05edee2b5
commit b65cae5874
No known key found for this signature in database
7 changed files with 218 additions and 233 deletions

View file

@ -308,18 +308,6 @@ impl Style {
}
}
pub fn apply_text_style<C, F, R>(&self, cx: &mut C, f: F) -> R
where
C: BorrowAppContext,
F: FnOnce(&mut C) -> R,
{
if self.text.is_some() {
cx.with_text_style(Some(self.text.clone()), f)
} else {
f(cx)
}
}
/// Paints the background of an element styled with this style.
pub fn paint(
&self,