1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
use std::path::PathBuf;
use gpui::{App, AppContext, Application, Bounds, WindowBounds, WindowOptions, px, size};
mod app;
mod projects_view;
mod theme;
use app::OpenCutApp;
pub fn projects_root() -> PathBuf {
std::env::home_dir()
.unwrap_or_else(|| PathBuf::from("."))
.join(".local/share/opencut/projects")
}
fn main() {
Application::new().run(|cx: &mut App| {
let bounds = Bounds::centered(None, size(px(1280.), px(720.)), cx);
cx.open_window(
WindowOptions {
window_bounds: Some(WindowBounds::Windowed(bounds)),
..Default::default()
},
|_, cx| cx.new(|cx| OpenCutApp::new(cx)),
)
.unwrap();
cx.activate(true);
});
}
|