From 1d490ea99adec73697a84d9bc749a98f657f8a54 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 17 Nov 2026 15:48:46 +0000 Subject: [PATCH] Web app: the brush-preset warning takes a notice Tone, and served_fonts::install no longer takes the context --- apps/photocraft-web/src/web.rs | 10 ++++++++-- crates/ui-egui/src/notices.rs | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/photocraft-web/src/web.rs b/apps/photocraft-web/src/web.rs index 29834742d7..ee319ba29e 100644 --- a/apps/photocraft-web/src/web.rs +++ b/apps/photocraft-web/src/web.rs @@ -108,7 +108,13 @@ pub fn start() { services.load_prefs = Some(Box::new(move || initial.take().unwrap_or_else(stored_preferences))); let mut app = PhotocraftApp::with_context(cc.egui_ctx.clone(), session, services); if !preset_warnings.is_empty() { - photocraft_ui_egui::notices::post(&mut app, i18n::t("Some brush presets could not be loaded"), preset_warnings, true, None); + photocraft_ui_egui::notices::post( + &mut app, + i18n::t("Some brush presets could not be loaded"), + preset_warnings, + photocraft_ui_egui::notices::Tone::Bad, + None, + ); } listen_pen(&pen_target, app.stylus.feed.clone()); app.set_theme(&cc.egui_ctx, AppTheme::pro()); @@ -438,7 +444,7 @@ impl WebShell { } }); } - served_fonts::install(&mut self.app, ctx, arrived); + served_fonts::install(&mut self.app, arrived); } } diff --git a/crates/ui-egui/src/notices.rs b/crates/ui-egui/src/notices.rs index 09ce943b7d..b6eece2369 100644 --- a/crates/ui-egui/src/notices.rs +++ b/crates/ui-egui/src/notices.rs @@ -5,7 +5,7 @@ //! [`show`]; `show` hands them to the window's toast queue, which owns the cards, their timers and //! the hover pause. [`Live`] remembers which queued toast belongs to which notice. -use craft::theme::variant::Tone; +pub use craft::theme::variant::Tone; use craft::ui::notices::{NoticeCenter, NoticeEnd, PostedNotice}; use craft::ui::runtime::toast::ToastId; use serde::{Deserialize, Serialize};