T44d Web · What a browser cannot do says why; fonts resolve; the bundle builds
Demos that open a second window, take files, move the window, read the clipboard or set native menus show a note on the web in the blocked style. IBM Plex Sans Regular joins the assets, unmodified, where gpui's svg renderer loads it: gpui_web answers .SystemUIFont with it. The gallery's web entry registers a Hebrew cut of Noto Sans Hebrew. scripts/web.sh builds the bundle with wasm-bindgen and wasm-opt -Oz, 20.0 MB, and fails past 25 MiB.
This commit is contained in:
1 parent
48c7b09d8d
commit
2cd2ca8bc1
26 files changed
+381
-76
No files matched your search
@@ -9,16 +9,27 @@ use gpui::{App, IntoElement, ParentElement, Styled, Window, div, px};
|
||||
use super::rows::{ran, run};
|
||||
use crate::{
|
||||
probe::probe,
|
||||
ui::{section, specimen},
|
||||
ui::{section, specimen, web_note},
|
||||
};
|
||||
|
||||
pub fn menu_bar(cx: &mut App) -> impl IntoElement + use<> {
|
||||
let menus = cx.get_menus().expect("the gallery sets its menus in main");
|
||||
let menus = match cx.get_menus() {
|
||||
Some(menus) => menus,
|
||||
None if cfg!(target_family = "wasm") => crate::app_menus()
|
||||
.into_iter()
|
||||
.map(gpui::Menu::owned)
|
||||
.collect(),
|
||||
None => panic!("the gallery sets its menus in main"),
|
||||
};
|
||||
section(
|
||||
"MenuBar Menu",
|
||||
"The app's own menus, the ones cx.set_menus gave the system, drawn in the window. Picking a row dispatches its action.",
|
||||
cx,
|
||||
)
|
||||
.children(web_note(
|
||||
"A browser page has no menu bar, and gpui on the web keeps no cx.set_menus: this bar draws the gallery's own list of the same menus.",
|
||||
cx,
|
||||
))
|
||||
.child(specimen(
|
||||
"hover moves between menus while one is open",
|
||||
probe("menubar", MenuBar::new("app-bar", menus)),
|
||||
|
||||
Reference in new issue
Block a user