Base soft wrapping on TextStyle instead of Settings

This commit is contained in:
Nathan Sobo
2021-09-17 15:39:19 -07:00
parent 68039b9d48
commit 42bf88b52a
5 changed files with 191 additions and 137 deletions
+10
View File
@@ -2335,6 +2335,16 @@ impl<V: View> ReadModel for RenderContext<'_, V> {
}
}
impl<V: View> UpdateModel for RenderContext<'_, V> {
fn update_model<T, F, S>(&mut self, handle: &ModelHandle<T>, update: F) -> S
where
T: Entity,
F: FnOnce(&mut T, &mut ModelContext<T>) -> S,
{
self.app.update_model(handle, update)
}
}
impl<M> AsRef<AppContext> for ViewContext<'_, M> {
fn as_ref(&self) -> &AppContext {
&self.app.cx