Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ members = [

[workspace.dependencies]
gpui = { path = "vendor/zed/crates/gpui", version = "0.2" }
gpui_platform = { path = "vendor/zed/crates/gpui_platform", version = "0.1" }

fluent-core = { path = "crates/fluent-core", version = "2.4.0" }
fluent-primitives = { path = "crates/fluent-primitives", version = "2.4.0" }
Expand Down
1 change: 1 addition & 0 deletions crates/fluent-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ categories = ["gui"]

[dependencies]
gpui = { workspace = true }
gpui_platform = { workspace = true }
fluent-core = { workspace = true }
fluent-layout = { workspace = true }
6 changes: 3 additions & 3 deletions crates/fluent-app/src/app_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::sync::Arc;
use fluent_core::Theme;
use fluent_layout::{modal::ModalStack, ToastStack};
use gpui::{
prelude::*, px, size, App, Application, AssetSource, Bounds, Context, Entity, IntoElement,
Render, SharedString, TitlebarOptions, Window, WindowBounds, WindowDecorations, WindowOptions,
prelude::*, px, size, App, AssetSource, Bounds, Context, Entity, IntoElement, Render,
SharedString, TitlebarOptions, Window, WindowBounds, WindowDecorations, WindowOptions,
};

use crate::{
Expand Down Expand Up @@ -159,7 +159,7 @@ impl FluentApp {
let dark = self.dark;
let assets = self.assets;

Application::new()
gpui_platform::application()
.with_assets(FluentAssets::new(assets))
.run(move |cx: &mut App| {
if dark {
Expand Down
1 change: 1 addition & 0 deletions crates/fluent-test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ edition = "2021"

[dependencies]
gpui = { workspace = true, features = ["test-support"] }
gpui_platform = { workspace = true }
fluent-core = { workspace = true }
7 changes: 7 additions & 0 deletions crates/fluent-test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ use fluent_core::Theme;

pub use gpui::{Context, Entity, TestAppContext, VisualTestContext, Window};

/// Build the GPUI application the way the ported crates do: the native platform
/// comes from `gpui_platform`, not `gpui::Application::new`, which the vendored
/// gpui no longer provides.
pub fn application() -> gpui::Application {
gpui_platform::application()
}

pub fn init_fluent_test(cx: &mut TestAppContext) {
cx.update(Theme::init);
}
Expand Down
Loading