wip: swapchain sizes ditcated by wgui

This commit is contained in:
galister
2025-06-19 02:21:44 +09:00
parent e09783791f
commit a03a855f19
6 changed files with 17 additions and 24 deletions

View File

@@ -167,7 +167,7 @@ fn new_toast(toast: Toast, app: &mut AppState) -> Option<(OverlayState, Box<dyn
toast.title
};
let mut panel = GuiPanel::new_blank(app, 600, 200).ok()?;
let mut panel = GuiPanel::new_blank(app, 2048).ok()?;
let (rect, _) = panel
.layout
@@ -232,7 +232,7 @@ fn new_toast(toast: Toast, app: &mut AppState) -> Option<(OverlayState, Box<dyn
let state = OverlayState {
name: TOAST_NAME.clone(),
want_visible: true,
spawn_scale: (panel.max_width as f32) * PIXELS_TO_METERS,
spawn_scale: (panel.max_size as f32) * PIXELS_TO_METERS,
spawn_rotation,
spawn_point,
z_order: Z_ORDER_TOAST,