some more bs

This commit is contained in:
2026-04-21 11:50:04 +01:00
parent 74a01bd9e6
commit 6c60013295
11 changed files with 177 additions and 58 deletions

View File

@@ -1,5 +1,6 @@
use gpui::{bounds, point, prelude::*, px, size};
mod api;
mod app;
mod asset;
mod colors;
@@ -8,7 +9,6 @@ mod dashboard;
mod query;
mod theme;
mod titlebar;
mod api;
fn main() {
gpui::Application::new()
@@ -18,25 +18,30 @@ fn main() {
fn setup_application(cx: &mut gpui::App) {
let window_bounds = gpui::Bounds::centered(None, size(px(800.), px(600.0)), cx);
let query_store = query::Store::new(
api::QueryContext {
http: reqwest::Client::new(),
auth: None,
},
cx,
);
let global = app::Global {
safe_area: bounds(point(px(0.), px(0.)), size(px(72.), px(12.))),
current_theme: cx.window_appearance().into(),
query_store: query::Store::new(api::QueryContext {
http: reqwest::Client::new(),
}),
};
let top_left = global.safe_area.origin;
cx.set_global(global);
cx.set_global(query_store);
cx.open_window(
gpui::WindowOptions {
window_bounds: Some(gpui::WindowBounds::Windowed(window_bounds)),
titlebar: Some(gpui::TitlebarOptions {
appears_transparent: true,
traffic_light_position: Some(top_left + point(px(8.), px(8.))),
traffic_light_position: Some(top_left + point(px(12.), px(12.))),
..Default::default()
}),
..Default::default()