From 3401232e4d01160637f1d47e953fd57e5e5b67ef Mon Sep 17 00:00:00 2001 From: thedancingdeveloper <306930456+thedancingdeveloper@users.noreply.github.com> Date: Wed, 14 Oct 2026 10:13:46 +0000 Subject: [PATCH] Port the screenshots example to gpui_platform::application() The vendored gpui removed Application::new(); the other examples go through FluentApp, which WI-1429 already moved. Only screenshots constructed the application directly. --- examples/screenshots/Cargo.toml | 1 + examples/screenshots/src/main.rs | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/screenshots/Cargo.toml b/examples/screenshots/Cargo.toml index 7dda368..786e8a0 100644 --- a/examples/screenshots/Cargo.toml +++ b/examples/screenshots/Cargo.toml @@ -6,6 +6,7 @@ publish = false [dependencies] gpui = { workspace = true } +gpui_platform = { workspace = true } fluent-core = { workspace = true } fluent-primitives = { workspace = true } fluent-layout = { workspace = true } diff --git a/examples/screenshots/src/main.rs b/examples/screenshots/src/main.rs index f25de8c..753ac30 100644 --- a/examples/screenshots/src/main.rs +++ b/examples/screenshots/src/main.rs @@ -26,8 +26,8 @@ use fluent_primitives::{ ToggleButton, }; use gpui::{ - div, prelude::*, px, App, Application, Bounds, Context, Entity, IntoElement, Point, - SharedString, Size, TitlebarOptions, Window, WindowBounds, WindowDecorations, WindowOptions, + div, prelude::*, px, App, Bounds, Context, Entity, IntoElement, Point, SharedString, Size, + TitlebarOptions, Window, WindowBounds, WindowDecorations, WindowOptions, }; const SENTINEL: &str = "/tmp/.fluent-screenshot-ready"; @@ -574,7 +574,9 @@ fn main() { let component = args.get(1).cloned().unwrap_or_else(|| "button".into()); let dark = !args.iter().any(|a| a == "--light"); - Application::new() + // The vendored gpui removed `Application::new()`; the platform crate + // constructs the application (see docs/gpui-api-drift.md). + gpui_platform::application() .with_assets(FluentAssets::new(None)) .run(move |cx: &mut App| { if dark {