Remove stray todo
This commit is contained in:
parent
5e50430299
commit
d5f0e91faa
2 changed files with 15 additions and 12 deletions
|
@ -184,13 +184,12 @@ impl AsyncWindowContext {
|
||||||
self.window.update(self, |_, cx| cx.update_global(update))
|
self.window.update(self, |_, cx| cx.update_global(update))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn spawn<Fut, R>(&self, f: impl FnOnce(AsyncWindowContext) -> Fut + 'static) -> Task<R>
|
pub fn spawn<Fut, R>(&self, f: impl FnOnce(AsyncWindowContext) -> Fut) -> Task<R>
|
||||||
where
|
where
|
||||||
Fut: Future<Output = R> + 'static,
|
Fut: Future<Output = R> + 'static,
|
||||||
R: 'static,
|
R: 'static,
|
||||||
{
|
{
|
||||||
let this = self.clone();
|
self.foreground_executor.spawn(f(self.clone()))
|
||||||
self.foreground_executor.spawn(async move { f(this).await })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,10 @@ mod mac;
|
||||||
mod test;
|
mod test;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
AnyWindowHandle, BackgroundExecutor, Bounds, DevicePixels, Font, FontId, FontMetrics, FontRun,
|
point, size, AnyWindowHandle, BackgroundExecutor, Bounds, DevicePixels, Font, FontId,
|
||||||
ForegroundExecutor, GlobalPixels, GlyphId, InputEvent, LineLayout, Pixels, Point,
|
FontMetrics, FontRun, ForegroundExecutor, GlobalPixels, GlyphId, InputEvent, LineLayout,
|
||||||
RenderGlyphParams, RenderImageParams, RenderSvgParams, Result, Scene, SharedString, Size,
|
Pixels, Point, RenderGlyphParams, RenderImageParams, RenderSvgParams, Result, Scene,
|
||||||
|
SharedString, Size,
|
||||||
};
|
};
|
||||||
use anyhow::{anyhow, bail};
|
use anyhow::{anyhow, bail};
|
||||||
use async_task::Runnable;
|
use async_task::Runnable;
|
||||||
|
@ -422,12 +423,15 @@ impl Column for WindowBounds {
|
||||||
"Fullscreen" => WindowBounds::Fullscreen,
|
"Fullscreen" => WindowBounds::Fullscreen,
|
||||||
"Maximized" => WindowBounds::Maximized,
|
"Maximized" => WindowBounds::Maximized,
|
||||||
"Fixed" => {
|
"Fixed" => {
|
||||||
// let ((x, y, width, height), _) = Column::column(statement, next_index)?;
|
let ((x, y, width, height), _) = Column::column(statement, next_index)?;
|
||||||
// WindowBounds::Fixed(RectF::new(
|
let x: f64 = x;
|
||||||
// Vector2F::new(x, y),
|
let y: f64 = y;
|
||||||
// Vector2F::new(width, height),
|
let width: f64 = width;
|
||||||
// ))
|
let height: f64 = height;
|
||||||
todo!()
|
WindowBounds::Fixed(Bounds {
|
||||||
|
origin: point(x.into(), y.into()),
|
||||||
|
size: size(width.into(), height.into()),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
_ => bail!("Window State did not have a valid string"),
|
_ => bail!("Window State did not have a valid string"),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue