2023-09-20 20:32:55 +00:00
|
|
|
#![allow(dead_code, unused_variables)]
|
|
|
|
|
2023-10-04 08:51:47 +00:00
|
|
|
use assets::Assets;
|
2023-10-03 23:39:03 +00:00
|
|
|
use gpui3::{px, size, Bounds, WindowBounds, WindowOptions};
|
2023-09-20 20:32:55 +00:00
|
|
|
use log::LevelFilter;
|
|
|
|
use simplelog::SimpleLogger;
|
2023-10-04 08:51:47 +00:00
|
|
|
use std::sync::Arc;
|
|
|
|
use workspace::workspace;
|
2023-09-20 20:32:55 +00:00
|
|
|
|
2023-10-04 08:51:47 +00:00
|
|
|
mod assets;
|
2023-09-20 20:32:55 +00:00
|
|
|
mod collab_panel;
|
|
|
|
mod theme;
|
2023-09-26 19:42:58 +00:00
|
|
|
mod themes;
|
2023-10-02 22:59:44 +00:00
|
|
|
mod ui;
|
2023-09-20 20:32:55 +00:00
|
|
|
mod workspace;
|
|
|
|
|
|
|
|
// gpui2::actions! {
|
|
|
|
// storybook,
|
|
|
|
// [ToggleInspector]
|
|
|
|
// }
|
|
|
|
|
|
|
|
fn main() {
|
2023-09-30 02:53:24 +00:00
|
|
|
// unsafe { backtrace_on_stack_overflow::enable() };
|
2023-09-30 01:21:08 +00:00
|
|
|
|
2023-09-20 20:32:55 +00:00
|
|
|
SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger");
|
|
|
|
|
2023-10-04 08:51:47 +00:00
|
|
|
let asset_source = Arc::new(Assets);
|
|
|
|
gpui3::App::production(asset_source).run(|cx| {
|
2023-09-30 16:01:59 +00:00
|
|
|
let window = cx.open_window(
|
|
|
|
WindowOptions {
|
|
|
|
bounds: WindowBounds::Fixed(Bounds {
|
2023-10-03 23:39:03 +00:00
|
|
|
origin: Default::default(),
|
|
|
|
size: size(px(800.), px(600.)),
|
2023-09-30 16:01:59 +00:00
|
|
|
}),
|
|
|
|
..Default::default()
|
|
|
|
},
|
|
|
|
|cx| workspace(cx),
|
|
|
|
);
|
|
|
|
|
|
|
|
cx.activate(true);
|
2023-09-21 04:26:46 +00:00
|
|
|
});
|
2023-09-20 20:32:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// fn load_embedded_fonts(platform: &dyn gpui2::Platform) {
|
|
|
|
// let font_paths = Assets.list("fonts");
|
|
|
|
// let mut embedded_fonts = Vec::new();
|
|
|
|
// for font_path in &font_paths {
|
|
|
|
// if font_path.ends_with(".ttf") {
|
|
|
|
// let font_path = &*font_path;
|
|
|
|
// let font_bytes = Assets.load(font_path).unwrap().to_vec();
|
|
|
|
// embedded_fonts.push(Arc::from(font_bytes));
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// platform.fonts().add_fonts(&embedded_fonts).unwrap();
|
|
|
|
// }
|