diff --git a/crates/ui-gallery/src/mock/editor.rs b/crates/ui-gallery/src/mock/editor.rs index 74b609326..4189f18d8 100644 --- a/crates/ui-gallery/src/mock/editor.rs +++ b/crates/ui-gallery/src/mock/editor.rs @@ -21,7 +21,7 @@ use craft_ui::patterns::form_dialogs::{ use craft_ui::rails::ToolRail; use craft_ui::runtime::commands::{CommandRef, Commands as _, EditCommands}; use craft_ui::runtime::env::{Label, WindowKey}; -use craft_ui::shell::{AppShell, AppShellOutput, CaptionFamily, Captions, Frame, ShellDialogsCx as _, Title, TitleBar}; +use craft_ui::shell::{AppShell, AppShellOutput, CaptionFamily, Captions, Frame, ScreenMode, ShellDialogsCx as _, Title, TitleBar}; use craft_window::Layout; use egui::Ui; @@ -41,24 +41,33 @@ const BLUR_MEMORY: SaveKey = SaveKey::new("craft_ui_gallery.gaussianBlur"); /// - Menus: every row is an app command with its chord; the body takes them. /// - Dialogs: Layer, Delete, Layer and Filter, Gaussian Blur open on the window's dialog host; Image, Image Size /// shows its dialog over the document's size. -/// - Screen modes: the shell's own commands (F) and the reveal keys act inside the window's region. +/// - Screen modes: the shell's own commands (F) and the reveal keys act inside the window's region; the +/// [`screen_mode`](Self::screen_mode) binding holds the mode. #[derive(craft_ui::contract::Pattern)] pub struct EditorMock<'a> { label: Label, state: &'a mut MockState, + screen_mode: Bind<'a, ScreenMode>, } impl<'a> EditorMock<'a> { /// A mock editor named `label` over `state`. pub fn new(label: impl Into