2023-08-11 06:26:58 +00:00
|
|
|
#![allow(dead_code, unused_variables)]
|
2023-07-14 21:34:31 +00:00
|
|
|
use log::LevelFilter;
|
|
|
|
use simplelog::SimpleLogger;
|
|
|
|
|
2023-08-20 04:33:28 +00:00
|
|
|
use themes::ThemeColors;
|
2023-07-25 05:27:14 +00:00
|
|
|
|
2023-08-14 03:20:41 +00:00
|
|
|
mod adapter;
|
2023-08-11 06:26:58 +00:00
|
|
|
mod color;
|
2023-08-16 01:29:57 +00:00
|
|
|
mod components;
|
2023-08-19 02:08:29 +00:00
|
|
|
mod div;
|
2023-08-14 01:47:49 +00:00
|
|
|
mod element;
|
2023-08-18 07:03:46 +00:00
|
|
|
mod hoverable;
|
2023-08-20 01:51:17 +00:00
|
|
|
mod layout_context;
|
2023-08-16 19:52:42 +00:00
|
|
|
mod paint_context;
|
2023-08-13 23:29:07 +00:00
|
|
|
mod style;
|
2023-08-16 12:22:47 +00:00
|
|
|
mod text;
|
2023-08-11 06:26:58 +00:00
|
|
|
mod themes;
|
2023-08-14 15:26:35 +00:00
|
|
|
mod view;
|
2023-08-11 06:26:58 +00:00
|
|
|
|
2023-08-14 20:46:09 +00:00
|
|
|
fn main() {
|
|
|
|
SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger");
|
2023-08-11 06:26:58 +00:00
|
|
|
|
2023-08-14 20:46:09 +00:00
|
|
|
gpui::App::new(()).unwrap().run(|cx| {
|
2023-08-20 04:33:28 +00:00
|
|
|
// cx.add_window(
|
|
|
|
// WindowOptions {
|
|
|
|
// bounds: gpui::platform::WindowBounds::Fixed(RectF::new(
|
|
|
|
// vec2f(0., 0.),
|
|
|
|
// vec2f(400., 300.),
|
|
|
|
// )),
|
|
|
|
// center: true,
|
|
|
|
// ..Default::default()
|
|
|
|
// },
|
|
|
|
// |_| view(|_| playground(&rose_pine::moon())),
|
|
|
|
// );
|
2023-08-14 20:46:09 +00:00
|
|
|
cx.platform().activate(true);
|
|
|
|
});
|
2023-07-25 05:27:14 +00:00
|
|
|
}
|
|
|
|
|
2023-08-20 04:33:28 +00:00
|
|
|
// fn playground<V: 'static>(theme: &ThemeColors) -> impl Element<V> {
|
|
|
|
// todo!()
|
|
|
|
// // frame()
|
|
|
|
// // .text_color(black())
|
|
|
|
// // .h_full()
|
|
|
|
// // .w_half()
|
|
|
|
// // .fill(theme.success(0.5))
|
|
|
|
// // .hover()
|
|
|
|
// // .fill(theme.error(0.5))
|
|
|
|
// // .child(button().label("Hello").click(|_, _, _| println!("click!")))
|
|
|
|
// }
|
2023-08-16 18:50:35 +00:00
|
|
|
|
2023-08-13 07:40:05 +00:00
|
|
|
// todo!()
|
|
|
|
// // column()
|
|
|
|
// // .size(auto())
|
|
|
|
// // .fill(theme.base(0.5))
|
|
|
|
// // .text_color(theme.text(0.5))
|
|
|
|
// // .child(title_bar(theme))
|
|
|
|
// // .child(stage(theme))
|
|
|
|
// // .child(status_bar(theme))
|
|
|
|
// }
|
2023-08-12 07:11:12 +00:00
|
|
|
|
|
|
|
// fn title_bar<V: 'static>(theme: &ThemeColors) -> impl Element<V> {
|
|
|
|
// row()
|
|
|
|
// .fill(theme.base(0.2))
|
|
|
|
// .justify(0.)
|
|
|
|
// .width(auto())
|
|
|
|
// .child(text("Zed Playground"))
|
2023-08-11 06:26:58 +00:00
|
|
|
// }
|
|
|
|
|
2023-08-12 07:11:12 +00:00
|
|
|
// fn stage<V: 'static>(theme: &ThemeColors) -> impl Element<V> {
|
|
|
|
// row().fill(theme.surface(0.9))
|
2023-08-11 06:26:58 +00:00
|
|
|
// }
|
|
|
|
|
2023-08-12 07:11:12 +00:00
|
|
|
// fn status_bar<V: 'static>(theme: &ThemeColors) -> impl Element<V> {
|
|
|
|
// row().fill(theme.surface(0.1))
|
2023-08-11 06:26:58 +00:00
|
|
|
// }
|