diff --git a/.config/cargo-ci.toml b/.config/cargo-ci.toml index 956491323b..93a48332ff 100644 --- a/.config/cargo-ci.toml +++ b/.config/cargo-ci.toml @@ -29,3 +29,9 @@ opt-level = 1 [profile.dev.package.craft-cms] opt-level = 1 + +# The runtime under every screen test: each frame of a fixture runs its pass, layout, focus and access tree. At +# opt-level 2 a suite trial runs about 40 percent fewer instructions than at 0 (Table activation 19.8 G to 11.9 G); +# opt-level 1 gives about 30 percent. Every UI crate waits for its compile, which grows by about a minute. +[profile.dev.package.craft-ui-contract] +opt-level = 2 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 63170f1214..33106085a5 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -167,8 +167,8 @@ jobs: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings # A selection that reaches a replay-audit crate builds once in a `build` job, which writes # three nextest archives and then runs the doctests; three shard legs run them in parallel: - # every selected test outside the replay audit's crates, those crates (run plainly, then with the - # audit), and craft-image-codecs with default features. Any other selection + # every selected test outside the replay audit's crates and craft-draw, those crates (run plainly, + # then the audit crates with the audit), and craft-image-codecs with default features. Any other selection # (and every macOS and Windows leg) builds and runs in one leg. scripts/ci-workspace-tests.sh # holds every step. test-shards: ${{ needs.platforms.outputs.audit == 'true' && 3 || 0 }} diff --git a/crates/font-manager/src/picker.rs b/crates/font-manager/src/picker.rs index 4831d8f129..6e3856bb59 100644 --- a/crates/font-manager/src/picker.rs +++ b/crates/font-manager/src/picker.rs @@ -529,7 +529,7 @@ const TEXT: PartKey = PartKey::new("text"); const CHEVRON: PartKey = PartKey::new("chevron"); /// The mark before the chevron of a shown font that is not installed; its tooltip is the note. const WARNING: PartKey = PartKey::new("missing"); -const WARNING_ICON: &str = "warning"; +const WARNING_ICON: &str = "warning_filled"; /// The popup the chevron and Alt+Down toggle. const POPUP: &str = "list"; /// The Show Similar part at the end of a family row, in the `Chips` layout. diff --git a/crates/font-manager/tests/it/picker.rs b/crates/font-manager/tests/it/picker.rs index a8f595e2b4..01f5653004 100644 --- a/crates/font-manager/tests/it/picker.rs +++ b/crates/font-manager/tests/it/picker.rs @@ -806,6 +806,64 @@ fn the_missing_font_warning_icon_paints_in_status_warn_fg_and_dims_when_disabled ); } +/// Texture ids of textured meshes whose centre falls inside `rect`. +fn mesh_textures(shapes: &[egui::Shape], rect: egui::Rect, out: &mut Vec) { + for shape in shapes { + match shape { + egui::Shape::Vec(inner) => mesh_textures(inner, rect, out), + egui::Shape::Mesh(mesh) if rect.contains(mesh.calc_bounds().center()) => { + out.push(mesh.texture_id); + } + _ => {} + } + } +} + +#[trial] +fn the_missing_font_warning_icon_is_a_filled_triangle() { + use std::cell::Cell; + + let catalog = catalog_of(&[INTER_REGULAR]); + let seen = Rc::new(Cell::new(None)); + let held = Rc::clone(&seen); + let mut family = "Gotham".to_owned(); + let mut fx = Fixture::new(move |ui| { + let out = FontPicker::new("Font family", Bind::bound(&mut family), &catalog).kind(FontPickerKind::Plain).shown_as("Inter").show(ui); + held.set(Some(out.edit.response.id)); + }); + fx.pixels_per_point(2.0); + fx.record_paint(); + fx.in_room(Room::Window); + fx.settle(); + let picker = seen.get().expect("the picker"); + let mark = fx.part_rect(picker, PartKey::new("missing")).expect("the field carries a mark while the family is not installed"); + let mut paint = fx.take_paint().expect("recorded paint output"); + let mut textures = Vec::new(); + for clipped in &paint.shapes { + mesh_textures(std::slice::from_ref(&clipped.shape), mark, &mut textures); + } + let texture = *textures.first().expect("the missing-font warning icon paints a texture"); + let image = paint + .textures_delta + .set + .get(&texture) + .and_then(|deltas| deltas.last()) + .map(|delta| match &delta.image { + egui::ImageData::Color(color) => color, + }) + .expect("the warning icon texture was uploaded"); + let [w, h] = image.size; + let alpha = |fx: f32, fy: f32| { + let x = ((w as f32 * fx) as usize).min(w - 1); + let y = ((h as f32 * fy) as usize).min(h - 1); + image.pixels[y * w + x].a() + }; + let (left, right, center) = (alpha(0.34, 0.69), alpha(0.66, 0.69), alpha(0.50, 0.48)); + paint.textures_delta.clear(); + assert!(left > 128 && right > 128, "the triangle interior is filled, not an outline (left={left}, right={right}, size={w}x{h})"); + assert!(center < 128, "the exclamation stem stays knocked out inside the filled triangle (center={center})"); +} + /// The library picker's family and settings, as the last pass left them. struct Library { family: String, diff --git a/crates/menu/src/shortcuts/keyboard.rs b/crates/menu/src/shortcuts/keyboard.rs index 9c2f74804d..9166e2533d 100644 --- a/crates/menu/src/shortcuts/keyboard.rs +++ b/crates/menu/src/shortcuts/keyboard.rs @@ -661,7 +661,7 @@ pub(crate) fn show(ui: &mut Ui, _cx: &mut BodyCx<'_>, env: &mut Env<'_>, state: state.keyboard.key = Some(key); } if let Some(c) = go { - state.go_to(&c); + state.go_to(env, &c); } if assign && let (Some(command), Some(key)) = (state.selected.clone(), state.keyboard.key) { let trigger = Trigger::single(Chord { mods, key }); diff --git a/crates/menu/src/shortcuts/mod.rs b/crates/menu/src/shortcuts/mod.rs index eed667ba9a..d8dd9b7f00 100644 --- a/crates/menu/src/shortcuts/mod.rs +++ b/crates/menu/src/shortcuts/mod.rs @@ -287,6 +287,10 @@ pub struct Options { /// The window title [`ShortcutsDialog::show`] draws and the summary's heading, already translated. /// `None`: the dialog's own "Keyboard Shortcuts". pub title: Option, + /// `None`: an editable dialog opens at the room the window gives it, and a read-only one at a moderate fixed size. + /// Otherwise the dialog opens at this size, in points, until the user resizes it; a size that is not finite is + /// ignored. + pub size: Option, /// true; false shows the table read-only with Close and Summarize. pub editable: bool, /// The name, already translated, that edits of a built-in set are saved under. `None`: the dialog's own @@ -308,6 +312,10 @@ pub struct Options { pub area_tabs: bool, /// The app's own Show entries. pub areas: Vec, + /// false: Show lists All Commands, each menu, Tools, each panel and Other before the app's own + /// [`areas`](Self::areas); true: it lists only the app's own entries (and Fixed Keys), and the + /// dialog opens on the first of them. + pub own_areas: bool, /// `None`: every catalog entry is listed. Otherwise the table, its Show entries and search /// list only the entries it returns true for; the others keep their bindings and still count /// in conflicts. @@ -333,6 +341,7 @@ impl Default for Options { fn default() -> Options { Options { title: None, + size: None, editable: true, custom_set_name: None, conflicts: ConflictMode::Ask, @@ -343,6 +352,7 @@ impl Default for Options { sort_by_label: false, area_tabs: false, areas: Vec::new(), + own_areas: false, visible: None, keyboard: false, fixed: Vec::new(), @@ -618,10 +628,15 @@ fn frame(ui: &mut Ui, env: &mut Env<'_>, state: &mut DialogState) -> ShortcutsOu // A read-only reference opens at a fixed, moderate height (production's key list scrolls inside it), not at the // window's; the user's own resize is still remembered. let reference = !env.options.editable; + let asked = env.options.size.filter(|size| size.is_finite()); + let size = asked.or(reference.then_some(egui::vec2(READ_ONLY_WIDTH, READ_ONLY_HEIGHT))); let session = RefCell::new(Session { env, state }); let shown = Dialog::new(title) .resizable(true) - .overlay(|overlay| if reference { overlay.size(egui::vec2(READ_ONLY_WIDTH, READ_ONLY_HEIGHT)) } else { overlay }) + .overlay(|overlay| match size { + Some(size) => overlay.size(size), + None => overlay, + }) .remember(SaveKey::new("craft_menu.shortcuts")) .outer_gesture(true) .collection_body() diff --git a/crates/menu/src/shortcuts/rows.rs b/crates/menu/src/shortcuts/rows.rs index 309ccf16a5..485d8fc7fc 100644 --- a/crates/menu/src/shortcuts/rows.rs +++ b/crates/menu/src/shortcuts/rows.rs @@ -210,8 +210,30 @@ fn listed<'k>(keymap: &'k Keymap, options: &Options) -> impl Iterator Vec { + let mut out = if options.own_areas { Vec::new() } else { built_in_areas(keymap, options, text) }; + let catalog = listed(keymap, options); + for a in options.areas.iter().filter(|a| catalog.clone().any(a.rows)) { + out.push(AreaEntry { id: AreaId::App(a.id), label: text.segment(a.label).into_owned() }); + } + if !options.fixed.is_empty() { + out.push(AreaEntry { id: AreaId::Fixed, label: text.words().fixed_keys.as_str().to_owned() }); + } + out +} + +/// The area that shows `b`'s row: All Commands when Show lists it, else the first listed area that holds the row. +pub(crate) fn area_of(areas: &[AreaEntry], b: &CommandDef, options: &Options) -> AreaId { + if areas.iter().any(|area| area.id == AreaId::All) { + return AreaId::All; + } + areas.iter().find(|area| in_area(&area.id, b, options)).map_or(AreaId::All, |area| area.id.clone()) +} + +/// All Commands, each menu, Tools, each panel and Other, leaving out areas with no rows. +fn built_in_areas(keymap: &Keymap, options: &Options, text: &Say) -> Vec { let catalog = listed(keymap, options); let mut out = vec![AreaEntry { id: AreaId::All, label: text.words().all_commands.as_str().to_owned() }]; let mut menus: Vec<&str> = Vec::new(); @@ -239,12 +261,6 @@ pub(crate) fn areas(keymap: &Keymap, options: &Options, text: &Say) -> Vec, state: &mut DialogState) { } let out = notice.show(ui); match (out.action, &goto) { - (Some(0), Some(command)) => state.go_to(command), + (Some(0), Some(command)) => state.go_to(env, command), (Some(at), Some(_)) if undo && at == 1 => state.undo(env), (Some(0), None) if undo => state.undo(env), _ => {} diff --git a/crates/menu/src/shortcuts/view/detail.rs b/crates/menu/src/shortcuts/view/detail.rs index d38514868d..d1394ee815 100644 --- a/crates/menu/src/shortcuts/view/detail.rs +++ b/crates/menu/src/shortcuts/view/detail.rs @@ -257,6 +257,6 @@ fn holders(ui: &mut Ui, env: &Env<'_>, state: &mut DialogState) { } } if let Some(command) = go { - state.go_to(&command); + state.go_to(env, &command); } } diff --git a/crates/menu/tests/it/shortcuts/mod.rs b/crates/menu/tests/it/shortcuts/mod.rs index 2fc7cba0e3..fc1ff547c8 100644 --- a/crates/menu/tests/it/shortcuts/mod.rs +++ b/crates/menu/tests/it/shortcuts/mod.rs @@ -22,3 +22,22 @@ fn a_read_only_dialog_opens_at_a_moderate_height() { let close = rig.fixture.by_label("Close").expect("the close button"); assert!(close.rect.bottom() < 560.0, "the dialog's footer sits within a moderate height, not the 700-point window: {:?}", close.rect); } + +/// The editable dialog's bounds, opened with `size` in the rig's 1000 by 700 point window. +fn dialog_bounds(size: Option) -> egui::Rect { + let rig = Rig::tuned(Platform::Windows, |options| options.size = size); + rig.fixture.by_role(craft_ui::contract::Role::DIALOG).first().expect("the dialog").rect +} + +/// An editable dialog opens at the size the app gives, larger or smaller than its own, and ignores a size that is not +/// finite. +#[trial] +fn an_editable_dialog_opens_at_the_size_the_app_gives() { + let own = dialog_bounds(None).size(); + for asked in [own + egui::vec2(200.0, 120.0), egui::vec2(own.x + 80.0, own.y - 60.0)] { + let opened = dialog_bounds(Some(asked)).size(); + assert!((opened - asked).abs().max_elem() < 1.0, "asked {asked:?}, opened {opened:?}, own {own:?}"); + } + let endless = dialog_bounds(Some(egui::vec2(f32::INFINITY, f32::NAN))).size(); + assert_eq!(endless, own, "a size that is not finite opens the dialog as without one"); +} diff --git a/crates/menu/tests/it/shortcuts/rows.rs b/crates/menu/tests/it/shortcuts/rows.rs index df232b1c33..5ff4299e35 100644 --- a/crates/menu/tests/it/shortcuts/rows.rs +++ b/crates/menu/tests/it/shortcuts/rows.rs @@ -4,9 +4,10 @@ use std::sync::Arc; use craft_host::{AppInfo, Host}; use craft_keymap::{Binding, CommandDef, CommandRef, Keymap, Platform, Policy, Scope, Scopes}; -use craft_menu::shortcuts::{HoldSetting, Outcome}; +use craft_menu::shortcuts::{Area, HoldSetting, Outcome}; use craft_ui::contract::Role; use craft_ui::testing::trial; +use egui::{Key, Modifiers}; use super::fixture::{self, Rig}; @@ -110,3 +111,69 @@ fn the_summary_without_a_ui_is_the_one_summarize_writes() { let (title, _) = text.split_once('\n').expect("a title line"); assert_eq!(craft_menu::shortcuts::summary::text_for(&km, &host, title), text); } + +fn is_tool(def: &CommandDef) -> bool { + matches!(def.kind, craft_keymap::CommandKind::Tool { .. }) +} + +fn area(rig: &Rig) -> String { + let shared = rig.shared.borrow(); + shared.state.snapshot(&shared.km).expect("the dialog has shown").area +} + +/// With `own_areas`, Show lists only the app's own entries, the dialog opens on the first of them, and its table +/// lists that entry's rows. Without it, the built-in entries come first and the dialog opens on All Commands. +#[trial] +fn own_areas_show_only_the_apps_entries_and_open_on_the_first() { + let tune = |own: bool| { + move |options: &mut craft_menu::shortcuts::Options| { + options.area_tabs = true; + options.areas = vec![Area::new("tools", "Tools", is_tool), Area::new("menu", "Menu Commands", |def| !is_tool(def))]; + options.own_areas = own; + } + }; + let rig = Rig::tuned(Platform::Mac, tune(true)); + assert_eq!(rig.names_with(Role::TAB, ""), ["Tools", "Menu Commands"], "only the app's entries are tabs"); + assert_eq!(area(&rig), "tools", "the dialog opens on the first of them"); + let rows = rig.names_with(Role::ROW, ""); + assert!(rows.iter().all(|row| row.contains("Marquee")) && !rows.is_empty(), "the table lists the Tools rows only: {rows:?}"); + + let rig = Rig::tuned(Platform::Mac, tune(false)); + let tabs = rig.names_with(Role::TAB, ""); + assert_eq!(tabs.first().map(String::as_str), Some("All Commands"), "the built-in entries come first: {tabs:?}"); + assert!(tabs.iter().any(|t| t == "Menu Commands"), "the app's entries follow them: {tabs:?}"); + assert_eq!(area(&rig), "all"); +} + +/// A dialog opened with a command selected, with Show listing only the app's entries, opens on the entry that lists it. +#[trial] +fn own_areas_open_on_the_selected_commands_entry() { + let mut rig = Rig::tuned(Platform::Mac, |options| { + options.areas = vec![Area::new("tools", "Tools", is_tool), Area::new("menu", "Menu Commands", |def| !is_tool(def))]; + options.own_areas = true; + }); + { + let mut shared = rig.shared.borrow_mut(); + let mut state = craft_menu::shortcuts::DialogState::new(); + state.select(&CommandRef::from("file.export")); + shared.state = state; + } + rig.pass(); + assert_eq!(area(&rig), "menu", "Export… is listed under Menu Commands"); + assert!(rig.names_with(Role::ROW, "").iter().any(|row| row.starts_with("Export…")), "its row shows"); +} + +/// Accept and Go to Conflict, with Show listing only the app's entries, shows the holder under the entry that lists +/// it. +#[trial] +fn going_to_a_conflict_picks_an_area_that_lists_the_holder() { + let mut rig = Rig::tuned(Platform::Mac, |options| { + options.areas = vec![Area::new("tools", "Tools", is_tool), Area::new("menu", "Menu Commands", |def| !is_tool(def))]; + options.own_areas = true; + }); + rig.click("Marquee Tool: M"); + rig.press(Modifiers::COMMAND, Key::E); + rig.click("Accept and Go to Conflict"); + assert_eq!(area(&rig), "menu", "Export… is listed under Menu Commands"); + assert!(rig.has("Export…"), "the holder's row shows"); +} diff --git a/crates/pages/src/ui/view.rs b/crates/pages/src/ui/view.rs index 0b08850bbd..bf510c36fc 100644 --- a/crates/pages/src/ui/view.rs +++ b/crates/pages/src/ui/view.rs @@ -1199,6 +1199,10 @@ fn run_pass( Label::from(words.page_of.fill(&[("page", label.as_str()), ("count", total.as_str())])) }; let bars = if count > 0 { bars.tip(&tip) } else { bars }; + // Pages that fit the view's width can't scroll sideways, so there is no horizontal bar. The layout drawn + // decides, as the bars measure it. + let (x_lo, x_hi) = offset_range(drawn.doc.x0, drawn.doc.x1, vw); + let bars = if x_lo >= x_hi { bars.vertical_only() } else { bars }; // Full screen's edge-to-edge view (`PageView::fill_screen`) has no scroll bars: nothing is drawn and nothing takes a press // along the window's edges. let bar_moved = if build.fill_screen { diff --git a/crates/pages/tests/it/views.rs b/crates/pages/tests/it/views.rs index 3ddb1e268c..bc77a2420a 100644 --- a/crates/pages/tests/it/views.rs +++ b/crates/pages/tests/it/views.rs @@ -107,6 +107,82 @@ impl PageSource for SmallPages { } } +/// Whether the view shows a horizontal scroll bar at `zoom` in a window 900 wide. +fn has_horizontal_bar(zoom: f64) -> bool { + let (fixture, _, _) = layout_rig( + 3, + state_with(|s| { + s.fit = Fit::None; + s.zoom = zoom; + }), + ); + horizontal_bar(&fixture).is_some() +} + +#[trial] +fn the_horizontal_bar_shows_only_when_the_pages_are_wider_than_the_view() { + assert!(!has_horizontal_bar(0.5), "pages that fit the width need no horizontal bar"); + assert!(has_horizontal_bar(3.0), "pages wider than the view scroll sideways"); +} + +/// The horizontal scroll bar the fixture shows, if any. +fn horizontal_bar(fixture: &Fixture) -> Option { + fixture.by_role(Role::SCROLL_BAR).iter().map(|bar| bar.rect).find(|rect| rect.width() > rect.height()) +} + +#[trial] +fn a_horizontal_thumb_held_while_the_pages_come_to_fit_keeps_its_bar_until_the_release() { + let (mut fixture, state, _) = layout_rig( + 3, + state_with(|s| { + s.fit = Fit::None; + s.zoom = 3.0; + }), + ); + let bar = horizontal_bar(&fixture).expect("pages wider than the view have a horizontal bar"); + // The view starts at the left edge, so the thumb is at the start of the track. + let from = pos2(bar.left() + 4.0, bar.center().y); + fixture.drag_hold_at(from, vec2(20.0, 0.0)); + state.borrow_mut().zoom = 0.5; + fixture.idle(3); + assert!(horizontal_bar(&fixture).is_some(), "the held thumb keeps its bar, so its release reaches it"); + fixture.release_at(from + vec2(20.0, 0.0)).idle(2); + assert!(horizontal_bar(&fixture).is_none(), "after the release, pages that fit have no horizontal bar"); +} + +#[trial] +fn a_horizontal_thumb_released_while_the_bars_are_not_shown_leaves_no_bar_behind() { + let state = Rc::new(RefCell::new(state_with(|s| { + s.fit = Fit::None; + s.zoom = 3.0; + }))); + let full_screen = Rc::new(Cell::new(false)); + let (kept, edge_to_edge) = (Rc::clone(&state), Rc::clone(&full_screen)); + let pages = DemoPages::new(3); + let mut fixture = Fixture::new(move |ui| { + let mut now = kept.borrow().clone(); + PageView::new("Pages", &pages, &mut now, PAPER).options(LayoutOptions::ACROBAT).fill_screen(edge_to_edge.get()).show(ui, |_, _| ()); + *kept.borrow_mut() = now; + }); + fixture.room(vec2(900.0, 600.0)); + fixture.settle(); + let bar = horizontal_bar(&fixture).expect("pages wider than the view have a horizontal bar"); + let from = pos2(bar.left() + 4.0, bar.center().y); + fixture.drag_hold_at(from, vec2(20.0, 0.0)); + // Full screen mid-drag: the bars go, and the release can't reach them. + full_screen.set(true); + fixture.idle(2); + fixture.release_at(from + vec2(20.0, 0.0)).idle(2); + full_screen.set(false); + { + let mut state = state.borrow_mut(); + state.fit = Fit::None; + state.zoom = 0.5; + } + fixture.idle(3); + assert!(horizontal_bar(&fixture).is_none(), "a press that ended unseen leaves no horizontal bar over pages that fit"); +} + #[trial] fn go_to_a_narrow_page_brings_it_back_into_horizontal_view() { let Rig { mut fixture, state, out, .. } = rig_over( diff --git a/crates/theme/sizes/comfortable.json b/crates/theme/sizes/comfortable.json index 3f3144323e..15e096456c 100644 --- a/crates/theme/sizes/comfortable.json +++ b/crates/theme/sizes/comfortable.json @@ -15,6 +15,7 @@ }, "size": { "bar": { + "column": 24.0, "options": 42.0, "options_narrow": 36.0, "status": 30.0, @@ -30,6 +31,7 @@ }, "dialog": { "button": 84.0, + "button_height": 30.0, "least": 380.0, "side_button": 96.0, "wrap": 440.0 @@ -73,7 +75,18 @@ }, "page": { "action": 30.0, + "button": 30.0, + "button_side": 0.0, "column": 820.0, + "gap": { + "actions": 8.0, + "heading": 8.0, + "lead": 16.0, + "link": 8.0, + "section": 16.0, + "title": 3.0 + }, + "link": 0.0, "margin": 50.0 }, "pane": { @@ -98,6 +111,7 @@ "groove": 5.0 }, "row": { + "menu": 30.0, "text": 21.0 }, "thumb": { @@ -135,6 +149,7 @@ "pad": { "chip": 6.0, "control": 8.0, + "dialog": 12.0, "regular": 12.0, "roomy": 20.0, "segment": 14.0 diff --git a/crates/theme/sizes/compact.json b/crates/theme/sizes/compact.json index 691f064615..afe565f4d0 100644 --- a/crates/theme/sizes/compact.json +++ b/crates/theme/sizes/compact.json @@ -15,6 +15,7 @@ }, "size": { "bar": { + "column": 20.0, "options": 36.0, "options_narrow": 28.0, "status": 24.0, @@ -30,6 +31,7 @@ }, "dialog": { "button": 84.0, + "button_height": 24.0, "least": 380.0, "side_button": 96.0, "wrap": 440.0 @@ -73,7 +75,18 @@ }, "page": { "action": 24.0, + "button": 24.0, + "button_side": 0.0, "column": 820.0, + "gap": { + "actions": 6.0, + "heading": 6.0, + "lead": 12.0, + "link": 6.0, + "section": 12.0, + "title": 2.0 + }, + "link": 0.0, "margin": 40.0 }, "pane": { @@ -98,6 +111,7 @@ "groove": 5.0 }, "row": { + "menu": 24.0, "text": 18.0 }, "thumb": { @@ -135,6 +149,7 @@ "pad": { "chip": 4.0, "control": 6.0, + "dialog": 8.0, "regular": 8.0, "roomy": 16.0, "segment": 10.0 diff --git a/crates/theme/src/app_sizes.rs b/crates/theme/src/app_sizes.rs index da08249df0..e3a46fe215 100644 --- a/crates/theme/src/app_sizes.rs +++ b/crates/theme/src/app_sizes.rs @@ -34,8 +34,22 @@ pub struct AppSizes { } /// Base values that follow another's override when an app sets none of their own: a push button stands a control high -/// in an app that changes the control's height alone. -const FOLLOWS: [(&str, &str); 1] = [("size.button", "size.control.md")]; +/// in an app that changes the control's height alone, a menu row too, a dialog's footer button a push button high, a +/// dialog is padded as a panel is, and a page keeps the rhythm of the gaps its own stand in for. Each size set gives +/// the follower the value it follows. +pub(crate) const FOLLOWS: [(&str, &str); 11] = [ + ("size.button", "size.control.md"), + ("size.row.menu", "size.control.md"), + ("size.dialog.button_height", "size.button"), + ("space.pad.dialog", "space.pad.regular"), + ("size.page.button", "size.button"), + ("size.page.gap.title", "space.gap.tight"), + ("size.page.gap.lead", "space.gap.section"), + ("size.page.gap.actions", "space.gap.stack"), + ("size.page.gap.section", "space.gap.section"), + ("size.page.gap.heading", "space.gap.stack"), + ("size.page.gap.link", "space.gap.stack"), +]; /// The base paths an app may override: sizes, spacing, corner radii, strokes and type sizes, not the /// edge or fonts. @@ -85,9 +99,9 @@ impl AppSizes { } /// The override of base value `path` (with no `base.` prefix) in `merged`: its own, else the one of the value it - /// follows when it has none. + /// follows when it has none, through every step of `FOLLOWS`. pub(crate) fn override_of<'m>(merged: &'m SizeMap, path: &str) -> Option<&'m SizeValue> { - merged.get(path).or_else(|| FOLLOWS.iter().find(|(own, _)| *own == path).and_then(|(_, of)| merged.get(*of))) + merged.get(path).or_else(|| FOLLOWS.iter().find(|(own, _)| *own == path).and_then(|(_, of)| Self::override_of(merged, of))) } /// The overrides for `size`: `all`, with the set's own map over it. diff --git a/crates/theme/src/app_sizes_tests.rs b/crates/theme/src/app_sizes_tests.rs index c8d9466581..9976d3dfea 100644 --- a/crates/theme/src/app_sizes_tests.rs +++ b/crates/theme/src/app_sizes_tests.rs @@ -3,6 +3,8 @@ use serde_json::{Value, json}; use super::*; +use crate::app_sizes::FOLLOWS; +use crate::sizes::{Preset, Slot, leaves}; fn sizes(v: &Value) -> AppSizes { AppSizes::parse(v.to_string().as_bytes()).unwrap() @@ -37,3 +39,47 @@ fn a_push_button_follows_the_control_height_unless_the_app_sets_its_own() { let own = applied(&json!({ "all": { "size.control.md": 40, "size.button": 30 } })); assert!(own.button < own.control.md, "the app's own button height wins"); } + +/// A page gap follows the gap it stands in for when the app sets only that one, and the page's New and Open follow a +/// push button down the chain to the control height; the app's own page values win. +#[test] +fn a_page_follows_the_values_it_stands_in_for_unless_the_app_sets_its_own() { + let base = crate::sizes::builtin(Size::Compact).base; + let applied = |v: &Value| { + let mut preset = base; + sizes(v).apply_base(Size::Compact, &mut preset); + preset + }; + let follows = applied(&json!({ "all": { "space.gap.section": 30, "size.control.md": 40 } })); + assert!(follows.space.gap.section > base.space.gap.section, "the override widens the section gap"); + assert_eq!(follows.size.page.gap.section, follows.space.gap.section, "the page's section gap follows it"); + assert_eq!(follows.size.page.button, follows.size.control.md, "New and Open follow the push button to the control height"); + let own = applied(&json!({ "all": { "space.gap.section": 30, "size.page.gap.section": 40 } })); + assert!(own.size.page.gap.section > own.space.gap.section, "the app's own page gap wins"); +} + +/// Each built-in size set gives a following value (`FOLLOWS`) the value it follows, so a new follower changes no app +/// that leaves it unset; an app's override reaches a follower through every step (a dialog's footer button follows the +/// push button, which follows the control height). +#[test] +fn a_follower_starts_at_the_value_it_follows_and_takes_its_override() { + let value = |preset: &mut Preset, path: &str| { + let want = format!("base.{path}"); + leaves(preset).into_iter().find_map(|l| match l.slot { + Slot::Num(x) | Slot::Length(x) if l.path == want => Some(*x), + _ => None, + }) + }; + for size in [Size::Compact, Size::Comfortable] { + let base = crate::sizes::builtin(size).base; + for (own, of) in FOLLOWS { + let mut preset = base; + assert_eq!(value(&mut preset, own), value(&mut preset, of), "{size:?}: {own} starts at {of}"); + } + let mut preset = base; + sizes(&json!({ "all": { "size.control.md": 40, "space.pad.regular": 20 } })).apply_base(size, &mut preset); + assert_eq!(value(&mut preset, "size.dialog.button_height"), Some(40.0), "{size:?}: through size.button"); + assert_eq!(value(&mut preset, "size.row.menu"), Some(40.0), "{size:?}"); + assert_eq!(value(&mut preset, "space.pad.dialog"), Some(20.0), "{size:?}"); + } +} diff --git a/crates/theme/src/dump.rs b/crates/theme/src/dump.rs index c818c44553..84ece5f937 100644 --- a/crates/theme/src/dump.rs +++ b/crates/theme/src/dump.rs @@ -7,9 +7,9 @@ use std::fmt::Write as _; use crate::{ BarSizes, ColorToken, ControlSizes, DialogSizes, DockColumnSizes, Easing, Edge, Elevation, ElevationTokens, FloatSizes, FontSlot, Gaps, - GripShape, HandleSizes, HitSizes, IconSizes, Insets, KnobShape, LengthSizes, Motion, MotionTokens, Pads, PageSizes, PaneSizes, PlotSizes, - RadiusSet, RailSizes, RampSizes, Rgba, RowSizes, ShapeTokens, SizeTokens, SpaceTokens, StrokeTokens, ThumbSamples, ThumbSizes, Tokens, TypeStyle, - TypeTokens, WellShape, WindowSizes, + GripShape, HandleSizes, HitSizes, IconSizes, Insets, KnobShape, LengthSizes, Motion, MotionTokens, Pads, PageGaps, PageSizes, PaneSizes, + PlotSizes, RadiusSet, RailSizes, RampSizes, Rgba, RowSizes, ShapeTokens, SizeTokens, SpaceTokens, StrokeTokens, ThumbSamples, ThumbSizes, Tokens, + TypeStyle, TypeTokens, WellShape, WindowSizes, }; /// The text of every token, one `key = value` line each, in a fixed order. @@ -108,8 +108,8 @@ fn space_lines(out: &mut Lines, space: &SpaceTokens) { ] { out.line(&format!("space.gap.{k}"), len(*v)); } - let Pads { control, regular, roomy, chip, segment } = pad; - for (k, v) in [("control", control), ("regular", regular), ("roomy", roomy), ("chip", chip), ("segment", segment)] { + let Pads { control, regular, dialog, roomy, chip, segment } = pad; + for (k, v) in [("control", control), ("regular", regular), ("dialog", dialog), ("roomy", roomy), ("chip", chip), ("segment", segment)] { out.line(&format!("space.pad.{k}"), len(*v)); } let Insets { screen, page_side, page_margin, page_gap } = inset; @@ -158,10 +158,16 @@ fn size_lines(out: &mut Lines, size: &SizeTokens) { let RailSizes { width, button } = rail; out.line("size.rail.width", len(*width)); out.line("size.rail.button", len(*button)); - let BarSizes { title, tab, tab_large, status, options, options_narrow } = bar; - for (k, v) in - [("title", title), ("tab", tab), ("tab_large", tab_large), ("status", status), ("options", options), ("options_narrow", options_narrow)] - { + let BarSizes { title, tab, tab_large, status, options, options_narrow, column } = bar; + for (k, v) in [ + ("title", title), + ("tab", tab), + ("tab_large", tab_large), + ("status", status), + ("options", options), + ("options_narrow", options_narrow), + ("column", column), + ] { out.line(&format!("size.bar.{k}"), len(*v)); } out.line("size.panel_header", len(*panel_header)); @@ -194,8 +200,9 @@ fn size_lines(out: &mut Lines, size: &SizeTokens) { out.line("size.length.short", len(*short)); out.line("size.length.number.sm", len(number.sm)); out.line("size.length.number.md", len(number.md)); - let RowSizes { text } = row; + let RowSizes { text, menu } = row; out.line("size.row.text", len(*text)); + out.line("size.row.menu", len(*menu)); out.line("size.groove", len(*groove)); let RampSizes { bar, groove: ramp_groove } = ramp; out.line("size.ramp.bar", len(*bar)); @@ -211,15 +218,26 @@ fn size_lines(out: &mut Lines, size: &SizeTokens) { out.line("size.pane.least", len(*least)); let DockColumnSizes { column } = dock; out.line("size.dock.column", len(*column)); - let DialogSizes { least, wrap, button, side_button } = dialog; + let DialogSizes { least, wrap, button, side_button, button_height } = dialog; out.line("size.dialog.least", len(*least)); out.line("size.dialog.wrap", len(*wrap)); out.line("size.dialog.button", len(*button)); out.line("size.dialog.side_button", len(*side_button)); - let PageSizes { column, margin, action } = page; + out.line("size.dialog.button_height", len(*button_height)); + let PageSizes { column, margin, action, button, button_side, gap, link } = page; out.line("size.page.column", len(*column)); out.line("size.page.margin", len(*margin)); out.line("size.page.action", len(*action)); + out.line("size.page.button", len(*button)); + out.line("size.page.button_side", len(*button_side)); + let PageGaps { title, lead, actions, section, heading, link: link_gap } = gap; + out.line("size.page.gap.title", len(*title)); + out.line("size.page.gap.lead", len(*lead)); + out.line("size.page.gap.actions", len(*actions)); + out.line("size.page.gap.section", len(*section)); + out.line("size.page.gap.heading", len(*heading)); + out.line("size.page.gap.link", len(*link_gap)); + out.line("size.page.link", len(*link)); } fn slot(s: FontSlot) -> &'static str { diff --git a/crates/theme/src/lib.rs b/crates/theme/src/lib.rs index 28e950415e..be1ca97ab0 100644 --- a/crates/theme/src/lib.rs +++ b/crates/theme/src/lib.rs @@ -98,9 +98,9 @@ pub use token_group::{GroupValues, TokenGroup}; pub use tokens::{ AccentColors, BarSizes, CaptionColors, ColorToken, ColorTokens, ControlSizes, DataColors, DialogSizes, DockColumnSizes, Edge, EdgeColors, ElevationTokens, FloatSizes, FontSlot, Gaps, GripMark, GripShape, HandleSizes, HitSizes, IconSizes, Insets, KnobShape, LengthSizes, LetterCase, - LineColors, LocatorShape, Motion, MotionTokens, OverlayColors, Pads, PageSizes, PaneSizes, PlotSizes, RadiusSet, RailSizes, RampSizes, RowSizes, - ShapeTokens, SizeTokens, SpaceTokens, StateColors, Status, StatusColors, StatusKind, StrokeTokens, SurfaceColors, TextColors, ThumbSamples, - ThumbSizes, Tokens, TypeRole, TypeStyle, TypeTokens, WellShape, WindowSizes, + LineColors, LocatorShape, Motion, MotionTokens, OverlayColors, Pads, PageGaps, PageSizes, PaneSizes, PlotSizes, RadiusSet, RailSizes, RampSizes, + RowSizes, ShapeTokens, SizeTokens, SpaceTokens, StateColors, Status, StatusColors, StatusKind, StrokeTokens, SurfaceColors, TextColors, + ThumbSamples, ThumbSizes, Tokens, TypeRole, TypeStyle, TypeTokens, WellShape, WindowSizes, }; pub use values::ColorSource; pub use variant::{CustomVariant, Emphasis, RadiusStep, Variant, VariantLook}; diff --git a/crates/theme/src/sizes.rs b/crates/theme/src/sizes.rs index 1c4e81cbd2..958483b8e2 100644 --- a/crates/theme/src/sizes.rs +++ b/crates/theme/src/sizes.rs @@ -107,6 +107,7 @@ pub(crate) fn leaves(b: &mut Preset) -> Vec> { "base.size.bar.status" Num 16.0..=64.0 => s.bar.status; "base.size.bar.options" Num 16.0..=80.0 => s.bar.options; "base.size.bar.options_narrow" Num 16.0..=80.0 => s.bar.options_narrow; + "base.size.bar.column" Num 8.0..=48.0 => s.bar.column; "base.size.panel_header" Num 16.0..=64.0 => s.panel_header; "base.size.popup_min" Num 64.0..=640.0 => s.popup_min; "base.size.thumb.sm" Num 12.0..=96.0 => s.thumb.sm; @@ -132,6 +133,7 @@ pub(crate) fn leaves(b: &mut Preset) -> Vec> { "base.size.length.number.sm" Num 32.0..=512.0 => s.length.number.sm; "base.size.length.number.md" Num 32.0..=512.0 => s.length.number.md; "base.size.row.text" Num 12.0..=48.0 => s.row.text; + "base.size.row.menu" Num 16.0..=64.0 => s.row.menu; "base.size.groove" Num 0.25..=16.0 => s.groove; "base.size.ramp.bar" Num 1.0..=64.0 => s.ramp.bar; "base.size.ramp.groove" Num 0.25..=32.0 => s.ramp.groove; @@ -146,9 +148,19 @@ pub(crate) fn leaves(b: &mut Preset) -> Vec> { "base.size.dialog.wrap" Num 120.0..=1024.0 => s.dialog.wrap; "base.size.dialog.button" Num 24.0..=240.0 => s.dialog.button; "base.size.dialog.side_button" Num 24.0..=240.0 => s.dialog.side_button; + "base.size.dialog.button_height" Num 16.0..=64.0 => s.dialog.button_height; "base.size.page.column" Num 240.0..=2048.0 => s.page.column; "base.size.page.margin" Num 0.0..=240.0 => s.page.margin; "base.size.page.action" Num 16.0..=96.0 => s.page.action; + "base.size.page.button" Num 16.0..=96.0 => s.page.button; + "base.size.page.button_side" Num 0.0..=64.0 => s.page.button_side; + "base.size.page.gap.title" Num 0.0..=64.0 => s.page.gap.title; + "base.size.page.gap.lead" Num 0.0..=64.0 => s.page.gap.lead; + "base.size.page.gap.actions" Num 0.0..=64.0 => s.page.gap.actions; + "base.size.page.gap.section" Num 0.0..=64.0 => s.page.gap.section; + "base.size.page.gap.heading" Num 0.0..=64.0 => s.page.gap.heading; + "base.size.page.gap.link" Num 0.0..=64.0 => s.page.gap.link; + "base.size.page.link" Num 0.0..=96.0 => s.page.link; } let sp = &mut b.space; leaves! { out; @@ -162,6 +174,7 @@ pub(crate) fn leaves(b: &mut Preset) -> Vec> { "base.space.gap.card_row" Num 0.0..=32.0 => sp.gap.card_row; "base.space.pad.control" Num 0.0..=32.0 => sp.pad.control; "base.space.pad.regular" Num 0.0..=32.0 => sp.pad.regular; + "base.space.pad.dialog" Num 0.0..=48.0 => sp.pad.dialog; "base.space.pad.roomy" Num 0.0..=32.0 => sp.pad.roomy; "base.space.pad.chip" Num 0.0..=32.0 => sp.pad.chip; "base.space.pad.segment" Num 0.0..=32.0 => sp.pad.segment; diff --git a/crates/theme/src/tokens/size.rs b/crates/theme/src/tokens/size.rs index e4e27432c1..bf7dd9f88f 100644 --- a/crates/theme/src/tokens/size.rs +++ b/crates/theme/src/tokens/size.rs @@ -176,8 +176,11 @@ pub struct Gaps { pub struct Pads { /// Inside controls. pub control: f32, - /// Inside panels and default dialog frames. + /// Inside panels. pub regular: f32, + /// Inside default dialog frames. An app that sets `space.pad.regular` and not this keeps its dialogs padded as its + /// panels are. + pub dialog: f32, /// Inside roomy dialogs. pub roomy: f32, /// Inside badges, key caps and chips: tighter than a control. @@ -259,6 +262,8 @@ pub struct BarSizes { pub options: f32, /// Tool options bar in its narrow form, for a window too small for the full bar. pub options_narrow: f32, + /// A dock column's bar, with its collapse chevron: a small control's height in the built-in sets. + pub column: f32, } /// Fixed sizes of controls and chrome. @@ -323,6 +328,33 @@ pub struct PageSizes { pub margin: f32, /// The height of a page's call to action (`ControlPlace::CallToAction`). pub action: f32, + /// The height of a page's New and Open (`ControlPlace::PageAction`). An app that sets `size.button` and not this + /// keeps them a push button high. + pub button: f32, + /// The least room at each side of a page action's label; 0 keeps a push button's. + pub button_side: f32, + /// A page's rhythm, each following the gap it stands in for unless an app sets it (`Gap::Page*`). + pub gap: PageGaps, + /// The least height of a page's link row; 0 keeps a link its text's height. + pub link: f32, +} + +/// The gaps of a full-window page's column, in logical pixels (`Gap::PageTitle` and its siblings). The size sets give +/// each the value of the gap it follows, so a page keeps that rhythm unless an app sets its own. +#[derive(Clone, Copy, Debug, Default, PartialEq)] +pub struct PageGaps { + /// Between the title and the subtitle (follows `space.gap.tight`). + pub title: f32, + /// Between the title and subtitle and New and Open under them (follows `space.gap.section`). + pub lead: f32, + /// Between New and Open (follows `space.gap.stack`). + pub actions: f32, + /// Between the column's sections (follows `space.gap.section`). + pub section: f32, + /// Between a section's heading and its body (follows `space.gap.stack`). + pub heading: f32, + /// Between the links (follows `space.gap.stack`). + pub link: f32, } /// The sizes of the panes of a dock's split, in logical pixels. @@ -350,6 +382,9 @@ pub struct DialogSizes { pub wrap: f32, /// The least width of a footer button. pub button: f32, + /// The height of a footer button. An app that sets `size.button` and not this keeps its footer buttons a push + /// button high. + pub button_height: f32, /// The least width of a button in a column beside the body. pub side_button: f32, } @@ -409,6 +444,8 @@ pub struct RowSizes { /// The height of a row that shows text only: one body line and `space.gap.tight`. Read-only display tables (a /// metadata table) take it; rows the user picks from stay a control high. pub text: f32, + /// The height of a menu's row. An app that sets `size.control.md` and not this keeps its menu rows a control high. + pub menu: f32, } /// Thicknesses of gradient ramps, in logical pixels. diff --git a/crates/theme/tests/dumps/tokens/adwaita-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/adwaita-dark-high-comfortable.txt index 97214109f0..8e5eec51b5 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/adwaita-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/adwaita-dark-high-compact.txt index 3d8e2e80e0..9616b41a3e 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/adwaita-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/adwaita-dark-standard-comfortable.txt index 527db8c474..99d598503e 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/adwaita-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/adwaita-dark-standard-compact.txt index 166ac8320c..bb3adeb54f 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/adwaita-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/adwaita-light-high-comfortable.txt index 0e9374c074..bfd4c2a4b7 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/adwaita-light-high-compact.txt b/crates/theme/tests/dumps/tokens/adwaita-light-high-compact.txt index 7ffd6bff25..428f4679ef 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/adwaita-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/adwaita-light-standard-comfortable.txt index a128232f33..bd0d5c8362 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/adwaita-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/adwaita-light-standard-compact.txt index b1c506ef28..63cc0e1092 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/artcraft-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/artcraft-dark-high-comfortable.txt index 8905789e4d..8e05869def 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/artcraft-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/artcraft-dark-high-compact.txt index 48674bae19..c5164ff6f3 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/artcraft-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/artcraft-dark-standard-comfortable.txt index 65b00fd8f5..83cde1b4d3 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/artcraft-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/artcraft-dark-standard-compact.txt index d0c756bbec..bf6f479d76 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/artcraft-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/artcraft-light-high-comfortable.txt index bbf7652198..7ae732239c 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/artcraft-light-high-compact.txt b/crates/theme/tests/dumps/tokens/artcraft-light-high-compact.txt index e9b5c2a339..f4055162b0 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/artcraft-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/artcraft-light-standard-comfortable.txt index fae2a7f079..5de1b1d40b 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/artcraft-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/artcraft-light-standard-compact.txt index 311f1caca8..22c786c1bc 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/breeze-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/breeze-dark-high-comfortable.txt index f78a73a717..da8de6122e 100644 --- a/crates/theme/tests/dumps/tokens/breeze-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/breeze-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/breeze-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/breeze-dark-high-compact.txt index 4a3a71bfbb..4dbde9f9df 100644 --- a/crates/theme/tests/dumps/tokens/breeze-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/breeze-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/breeze-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/breeze-dark-standard-comfortable.txt index 2778cbf09d..d48eaefff7 100644 --- a/crates/theme/tests/dumps/tokens/breeze-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/breeze-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/breeze-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/breeze-dark-standard-compact.txt index d1055c5693..6250cbd212 100644 --- a/crates/theme/tests/dumps/tokens/breeze-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/breeze-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/breeze-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/breeze-light-high-comfortable.txt index 0a34ade73b..89a38d3fe0 100644 --- a/crates/theme/tests/dumps/tokens/breeze-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/breeze-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/breeze-light-high-compact.txt b/crates/theme/tests/dumps/tokens/breeze-light-high-compact.txt index 63932a93e8..1d3a65eee2 100644 --- a/crates/theme/tests/dumps/tokens/breeze-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/breeze-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/breeze-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/breeze-light-standard-comfortable.txt index 5df6f0ec52..d6ca71d5f9 100644 --- a/crates/theme/tests/dumps/tokens/breeze-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/breeze-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/breeze-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/breeze-light-standard-compact.txt index b586bf86cf..ebc7d71b49 100644 --- a/crates/theme/tests/dumps/tokens/breeze-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/breeze-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/classic-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/classic-light-high-comfortable.txt index 4d9b5acf95..61cb69af23 100644 --- a/crates/theme/tests/dumps/tokens/classic-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/classic-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/classic-light-high-compact.txt b/crates/theme/tests/dumps/tokens/classic-light-high-compact.txt index d7fa038740..0ca15ed942 100644 --- a/crates/theme/tests/dumps/tokens/classic-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/classic-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/classic-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/classic-light-standard-comfortable.txt index cac48b4d49..5af6b006e3 100644 --- a/crates/theme/tests/dumps/tokens/classic-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/classic-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/classic-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/classic-light-standard-compact.txt index 85abdaa3dc..245919d79c 100644 --- a/crates/theme/tests/dumps/tokens/classic-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/classic-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/graphite-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/graphite-dark-high-comfortable.txt index 30e9dd81c3..460784c315 100644 --- a/crates/theme/tests/dumps/tokens/graphite-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/graphite-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/graphite-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/graphite-dark-high-compact.txt index c7837bdaa7..a623008439 100644 --- a/crates/theme/tests/dumps/tokens/graphite-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/graphite-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/graphite-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/graphite-dark-standard-comfortable.txt index 3a0c7efcdd..d7843dc149 100644 --- a/crates/theme/tests/dumps/tokens/graphite-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/graphite-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/graphite-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/graphite-dark-standard-compact.txt index f2002683b4..cd4a1b9db4 100644 --- a/crates/theme/tests/dumps/tokens/graphite-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/graphite-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/graphite-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/graphite-light-high-comfortable.txt index 257b6467b1..6cabc69b57 100644 --- a/crates/theme/tests/dumps/tokens/graphite-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/graphite-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/graphite-light-high-compact.txt b/crates/theme/tests/dumps/tokens/graphite-light-high-compact.txt index 148b62371e..dec4dfff76 100644 --- a/crates/theme/tests/dumps/tokens/graphite-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/graphite-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/graphite-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/graphite-light-standard-comfortable.txt index c7399d4424..fbddb2096e 100644 --- a/crates/theme/tests/dumps/tokens/graphite-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/graphite-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/graphite-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/graphite-light-standard-compact.txt index bd569c4d0d..7fcbd0bef1 100644 --- a/crates/theme/tests/dumps/tokens/graphite-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/graphite-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-dark-high-comfortable.txt index bb87961d24..ad3eab959b 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/pro-dark-high-compact.txt index e3f0477dfc..ff40e11024 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable-app-sizes.txt b/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable-app-sizes.txt index e2baacfe8a..1b8d7c24de 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable-app-sizes.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable-app-sizes.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 14 +space.pad.dialog = 14 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 28 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 28 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 28 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable.txt index bdbe993eac..b3ddcedb95 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/pro-dark-standard-compact.txt index 29caba27ef..ee02262150 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-comfortable.txt index 1c177daaaf..300b3802f1 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-compact.txt b/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-compact.txt index b11a4ee8ef..27db441dd3 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-comfortable.txt index f2396ce7b5..4e2d60d87b 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-compact.txt index fe12225a17..da83865dea 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-light-high-comfortable.txt index 87ce0338e6..6ffb292cbd 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-light-high-compact.txt b/crates/theme/tests/dumps/tokens/pro-light-high-compact.txt index 04bd4a7a3d..ca70e2b4c7 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-light-standard-comfortable.txt index 0010638c8a..4255d49a8f 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/pro-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/pro-light-standard-compact.txt index 229ad03d4f..35e3129d2d 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/soft-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/soft-dark-high-comfortable.txt index 1bece30c56..a20c41bb74 100644 --- a/crates/theme/tests/dumps/tokens/soft-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/soft-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/soft-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/soft-dark-high-compact.txt index 553d048da8..2f8c94d2d8 100644 --- a/crates/theme/tests/dumps/tokens/soft-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/soft-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/soft-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/soft-dark-standard-comfortable.txt index b185adc363..190a24b654 100644 --- a/crates/theme/tests/dumps/tokens/soft-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/soft-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/soft-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/soft-dark-standard-compact.txt index c0df85540a..f0f435aef1 100644 --- a/crates/theme/tests/dumps/tokens/soft-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/soft-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/soft-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/soft-light-high-comfortable.txt index 9da6fb3422..586c299641 100644 --- a/crates/theme/tests/dumps/tokens/soft-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/soft-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/soft-light-high-compact.txt b/crates/theme/tests/dumps/tokens/soft-light-high-compact.txt index bad97b7a99..1dd2cd15fc 100644 --- a/crates/theme/tests/dumps/tokens/soft-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/soft-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/soft-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/soft-light-standard-comfortable.txt index 0e6ec0d87d..55eb9f36d9 100644 --- a/crates/theme/tests/dumps/tokens/soft-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/soft-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/soft-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/soft-light-standard-compact.txt index 6ea6ef3e5d..eb99cd7c7f 100644 --- a/crates/theme/tests/dumps/tokens/soft-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/soft-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-comfortable.txt index c1e98773bc..f50ae9a4dd 100644 --- a/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-compact.txt index 03d4694907..53eca4a616 100644 --- a/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-comfortable.txt index cf0f273e88..4bf8a58b61 100644 --- a/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-compact.txt index 58c8ea3cb7..c150d533e0 100644 --- a/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/studio-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/studio-dark-high-comfortable.txt index 343160396e..bddceef55a 100644 --- a/crates/theme/tests/dumps/tokens/studio-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/studio-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/studio-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/studio-dark-high-compact.txt index f67f595938..3e147fa7eb 100644 --- a/crates/theme/tests/dumps/tokens/studio-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/studio-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/studio-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/studio-dark-standard-comfortable.txt index 1dc872c253..a692592aaf 100644 --- a/crates/theme/tests/dumps/tokens/studio-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/studio-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/studio-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/studio-dark-standard-compact.txt index 1929ef4f1f..6a3459b130 100644 --- a/crates/theme/tests/dumps/tokens/studio-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/studio-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/studio-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/studio-light-high-comfortable.txt index 816f246495..f786d932ac 100644 --- a/crates/theme/tests/dumps/tokens/studio-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/studio-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/studio-light-high-compact.txt b/crates/theme/tests/dumps/tokens/studio-light-high-compact.txt index 414c17e58e..097cc1014a 100644 --- a/crates/theme/tests/dumps/tokens/studio-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/studio-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/studio-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/studio-light-standard-comfortable.txt index 8efa894323..495a587635 100644 --- a/crates/theme/tests/dumps/tokens/studio-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/studio-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/studio-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/studio-light-standard-compact.txt index 0920634b06..37cefe8908 100644 --- a/crates/theme/tests/dumps/tokens/studio-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/studio-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-comfortable.txt index 706fd0c2cd..f6cc4664aa 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-compact.txt index edf0d2d7b9..0d4bc1a574 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-comfortable.txt index 5babd1d779..4f34ee8570 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-compact.txt index c9e1fd086e..0016d3b8f5 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-comfortable.txt index f3a5ad5c7a..2909929b10 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-compact.txt index c7a1bc99c8..deff824ff2 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-comfortable.txt index 5fd31f242e..66e454fbe6 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-compact.txt index f8828fa20f..3eaea40da3 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-comfortable.txt index d8b6ce06c7..1535dfa222 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-compact.txt index fa43b9602b..f58bb3abc0 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-comfortable.txt index 7b0559933d..66dad0b281 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-compact.txt index 006eaa302d..55361654ae 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-comfortable.txt index fcce02ab84..13c9020bf3 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-compact.txt index b30c030ff4..e6da117635 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-comfortable.txt index a0b1f1dc08..eb6164ff38 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-comfortable.txt @@ -137,6 +137,7 @@ space.gap.card_column = 16 space.gap.card_row = 24 space.pad.control = 8 space.pad.regular = 12 +space.pad.dialog = 12 space.pad.roomy = 20 space.pad.chip = 6 space.pad.segment = 14 @@ -160,6 +161,7 @@ size.bar.tab_large = 38 size.bar.status = 30 size.bar.options = 42 size.bar.options_narrow = 36 +size.bar.column = 24 size.panel_header = 34 size.popup_min = 240 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 120 size.length.number.sm = 72 size.length.number.md = 90 size.row.text = 21 +size.row.menu = 30 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 30 size.page.column = 820 size.page.margin = 50 size.page.action = 30 +size.page.button = 30 +size.page.button_side = 0 +size.page.gap.title = 3 +size.page.gap.lead = 16 +size.page.gap.actions = 8 +size.page.gap.section = 16 +size.page.gap.heading = 8 +size.page.gap.link = 8 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-compact.txt index 3b4e7a95f2..9c39c4f922 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-compact.txt @@ -137,6 +137,7 @@ space.gap.card_column = 12 space.gap.card_row = 18 space.pad.control = 6 space.pad.regular = 8 +space.pad.dialog = 8 space.pad.roomy = 16 space.pad.chip = 4 space.pad.segment = 10 @@ -160,6 +161,7 @@ size.bar.tab_large = 32 size.bar.status = 24 size.bar.options = 36 size.bar.options_narrow = 28 +size.bar.column = 20 size.panel_header = 28 size.popup_min = 192 size.thumb.sm = 18 @@ -185,6 +187,7 @@ size.length.short = 96 size.length.number.sm = 60 size.length.number.md = 72 size.row.text = 18 +size.row.menu = 24 size.groove = 3 size.ramp.bar = 10 size.ramp.groove = 5 @@ -199,9 +202,19 @@ size.dialog.least = 380 size.dialog.wrap = 440 size.dialog.button = 84 size.dialog.side_button = 96 +size.dialog.button_height = 24 size.page.column = 820 size.page.margin = 40 size.page.action = 24 +size.page.button = 24 +size.page.button_side = 0 +size.page.gap.title = 2 +size.page.gap.lead = 12 +size.page.gap.actions = 6 +size.page.gap.section = 12 +size.page.gap.heading = 6 +size.page.gap.link = 6 +size.page.link = 0 stroke.thin = 1 stroke.medium = 1.5 stroke.thick = 2 diff --git a/crates/ui-canvas/src/canvas/scrollbars/mod.rs b/crates/ui-canvas/src/canvas/scrollbars/mod.rs index f0d190d33b..f4e30e5e3f 100644 --- a/crates/ui-canvas/src/canvas/scrollbars/mod.rs +++ b/crates/ui-canvas/src/canvas/scrollbars/mod.rs @@ -477,7 +477,9 @@ impl<'a> CanvasScrollbars<'a> { } fn bars(&self, view: &CanvasView, rect: Rect, style: &ScrollbarsStyle, held: Option<&HeldThumb>) -> Bars { - Bars::of(view, self.document, self.overscroll, !self.vertical_only, rect, style, held) + // A horizontal thumb held keeps its bar until the press ends, so its release closes the drag. + let horizontal = !self.vertical_only || held.is_some_and(|held| held.on(Axis::X)); + Bars::of(view, self.document, self.overscroll, horizontal, rect, style, held) } } @@ -547,6 +549,16 @@ impl Component for CanvasScrollbars<'_> { } let Some(view) = cx.value().copied() else { return }; let mut held = cx.press_slot::().clone(); + // A press that ended while the bars weren't shown (a full-screen view drops them) never reached them: its thumb + // is idle again, and the extent kept for it is stale. + let stale = held.as_ref().is_some_and(|held| { + let thumb = thumb_of(if held.horizontal { HORIZONTAL } else { VERTICAL }); + matches!(cx.part(thumb).press.phase, PressPhase::Idle | PressPhase::Hover) + }); + if stale { + *cx.press_slot::() = None; + held = None; + } let bars = self.bars(&view, cx.rect, cx.style, held.as_ref()); let mut ended = false; let rtl = cx.flow.is_rtl(); diff --git a/crates/ui-canvas/tests/it/full_window_parts.rs b/crates/ui-canvas/tests/it/full_window_parts.rs index 6dd2626e62..fa25222cc7 100644 --- a/crates/ui-canvas/tests/it/full_window_parts.rs +++ b/crates/ui-canvas/tests/it/full_window_parts.rs @@ -362,6 +362,58 @@ pub(crate) mod own_window { assert!(!open.get(), "closing the dialog's window closes the dialog"); assert_eq!(closed.get(), Some((CloseReason::Requested, true)), "the close is a cancel"); } + + /// photocraft#16905: in a window the app frames, a full-window dialog's own window moves by its title row. Its + /// fallback covers the main window and does not move, and the window took that rule, so RAW Develop's window could + /// not be moved. + #[trial] + fn a_full_window_dialogs_own_window_moves_by_its_title_row() { + use craft_host::target::{Backend, Os, ShellInfo, WindowKind}; + use craft_ui::runtime::InstallSpec; + use craft_ui::testing::pointer::{moved, press, release}; + use craft_ui::testing::windows::FakeSystem; + use craft_window::policy::{Desktop, DesktopKind, Runtime, TitleBarPref}; + use egui::{Pos2, Rect, Vec2, ViewportCommand, pos2, vec2}; + use std::sync::Arc; + + let desktop = Desktop { kind: DesktopKind::Other, ssd: None, gtk_theme: None, icon_theme: None }; + let integrated = + craft_window::policy::decide(Os::Linux, Runtime::Native, Backend::X11, &desktop, WindowKind::Main, TitleBarPref::Integrated, None); + let windows = Windows::with(InstallSpec::new(ShellInfo::default(), Arc::new(FakeSystem::new())).frame(integrated)); + let open = Cell::new(true); + let frame = |events: Vec| { + windows.frame(vec![], events, |ui| { + let mut is_open = open.get(); + FullWindowDialog::new("Workspace").own_window(WindowSpec::dialog()).opened(Bind::bound(&mut is_open)).show(ui, |_, _| {}); + open.set(is_open); + }) + }; + let rect = Rect::from_min_size(Pos2::new(100.0, 100.0), Vec2::new(900.0, 640.0)); + windows.child_info(ViewportInfo { + inner_rect: Some(rect), + outer_rect: Some(rect), + native_pixels_per_point: Some(1.0), + ..ViewportInfo::default() + }); + for _ in 0..4 { + frame(vec![]); + } + // Clear of the top edge's grip and of the title row's own parts (the title at the start, the close action at + // the end). + let at = pos2(450.0, 14.0); + let mut sent = Vec::new(); + for events in [ + vec![moved(at)], + vec![press(at)], + vec![moved(at + vec2(20.0, 10.0))], + vec![moved(at + vec2(40.0, 20.0))], + vec![release(at + vec2(40.0, 20.0))], + ] { + sent.extend(frame(events).commands.into_iter().map(|(_, command)| command)); + } + assert!(open.get(), "the dialog stays open"); + assert!(sent.contains(&ViewportCommand::StartDrag), "a drag of the title row moves the window: {sent:?}"); + } } /// An overlay drawn through a frame. diff --git a/crates/ui-contract/icons/ATTRIBUTION.md b/crates/ui-contract/icons/ATTRIBUTION.md index 4579d05c91..7baac2bd35 100644 --- a/crates/ui-contract/icons/ATTRIBUTION.md +++ b/crates/ui-contract/icons/ATTRIBUTION.md @@ -11,7 +11,7 @@ Each folder holds only the files `icons.toml` lists, unchanged from the pinned s Carbon's licence file is the repository's root `LICENSE` (the icons package has none of its own). -Every set folder's files come from the npm package of the version in the table (`@phosphor-icons/core` 2.0.8, `lucide-static` 1.63.0, `@carbon/icons` 11.91.0, `@tabler/icons` 3.50.0), the same releases as the tags above. Phosphor files are `regular` weight, except `star-filled.svg` and `circle-filled.svg`, which are Phosphor's `fill` weight (`star-fill.svg`, `circle-fill.svg`). `panel-left.svg` is Phosphor's `sidebar-simple` unchanged, and `panel-right.svg` is the same glyph mirrored. +Every set folder's files come from the npm package of the version in the table (`@phosphor-icons/core` 2.0.8, `lucide-static` 1.63.0, `@carbon/icons` 11.91.0, `@tabler/icons` 3.50.0), the same releases as the tags above. Phosphor files are `regular` weight, except `star-filled.svg`, `circle-filled.svg` and `warning-filled.svg`, which are Phosphor's `fill` weight (`star-fill.svg`, `circle-fill.svg`, `warning-fill.svg`). `panel-left.svg` is Phosphor's `sidebar-simple` unchanged, and `panel-right.svg` is the same glyph mirrored. `phosphor/` also holds drawings made for the suite, for glyphs the pinned Phosphor release lacks. They follow Phosphor's regular style (256 view box, 16-unit round-capped strokes, some converted to filled outlines), take their shapes from PhotoCraft's glyphs, and carry the suite's own licence: diff --git a/crates/ui-contract/icons/icons.toml b/crates/ui-contract/icons/icons.toml index 2a324cd10a..7fdd9233c7 100644 --- a/crates/ui-contract/icons/icons.toml +++ b/crates/ui-contract/icons/icons.toml @@ -454,6 +454,11 @@ phosphor = "warning" carbon = "warning--alt" tabler = "alert-triangle" +[[icon]] +name = "warning_filled" +directional = false +phosphor = "warning-filled" + [[icon]] name = "web_colors" directional = false diff --git a/crates/ui-contract/icons/phosphor/warning-filled.svg b/crates/ui-contract/icons/phosphor/warning-filled.svg new file mode 100644 index 0000000000..f8ada0ad27 --- /dev/null +++ b/crates/ui-contract/icons/phosphor/warning-filled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/ui-contract/src/contract/body/regions.rs b/crates/ui-contract/src/contract/body/regions.rs index a02bea21bb..5b4025a61e 100644 --- a/crates/ui-contract/src/contract/body/regions.rs +++ b/crates/ui-contract/src/contract/body/regions.rs @@ -52,6 +52,7 @@ pub fn pad_of(tokens: &UiTokens, pad: Pad) -> f32 { Pad::Tight => tokens.tokens().space.gap.tight, Pad::Control => pads.control, Pad::Regular => pads.regular, + Pad::Dialog => pads.dialog, Pad::Roomy => pads.roomy, Pad::Page => pads.roomy * 2.5, _ => 0.0, @@ -136,7 +137,7 @@ impl Gap { } pub(super) fn gap_of(tokens: &UiTokens, gap: Gap) -> f32 { - let gaps = &tokens.tokens().space.gap; + let (gaps, page) = (&tokens.tokens().space.gap, &tokens.tokens().size.page.gap); match gap { Gap::None => 0.0, Gap::Tight => gaps.tight, @@ -146,6 +147,12 @@ pub(super) fn gap_of(tokens: &UiTokens, gap: Gap) -> f32 { Gap::CardColumn => gaps.card_column, Gap::CardRow => gaps.card_row, Gap::Inline => gaps.inline, + Gap::PageTitle => page.title, + Gap::PageLead => page.lead, + Gap::PageActions => page.actions, + Gap::PageSection => page.section, + Gap::PageHeading => page.heading, + Gap::PageLink => page.link, _ => gaps.row, } } diff --git a/crates/ui-contract/src/contract/body/window.rs b/crates/ui-contract/src/contract/body/window.rs index 79eb032b4d..087510715e 100644 --- a/crates/ui-contract/src/contract/body/window.rs +++ b/crates/ui-contract/src/contract/body/window.rs @@ -795,11 +795,16 @@ impl BodyHooks<'_> { }; let exclusive = |hit: WindowHit| os.is_some().then_some(hit); let moves_window = matches!(&props.mount, Mount::Layer(overlay) | Mount::Viewport { fallback: overlay, .. } if overlay.moves_window); + // A full-window container in an OS window of its own: its fallback layer covers the main window, so neither + // moves nor resizes, but the window is one the user moves by its title row and sizes by its edges, as any + // window. Without them a window the app frames had no band and no grips (photocraft#16905). + let own_full_window = os.is_some() && matches!(&props.mount, Mount::Viewport { fallback, .. } if fallback.is_full_window()); // A layer moves when its overlay says so; other mounts follow the header's band. let movable = match &props.mount { // A band that moves the window below follows the rule of the window's own band (a title bar's); where the // platform answers the hit test, the sink reads it from the exclusive list. _ if moves_window => WindowParts::of(&ctx, pass::current_viewport(&ctx)).band, + _ if own_full_window => stands.band, Mount::Layer(overlay) | Mount::Viewport { fallback: overlay, .. } => overlay.movable && stands.band, _ => props.header.is_some_and(|header| header.band == crate::contract::DragBand::Move) && stands.band, }; @@ -810,8 +815,9 @@ impl BodyHooks<'_> { // areas cover its ends and top edge, and a cursor set over them fights the OS's. let moved = os.or(moves_window.then(|| pass::current_viewport(&ctx))); let os_bar = moved.is_some_and(|viewport| windows::shell_of(&ctx, viewport).window.chrome == WindowChrome::Inset); + let hand = pcx.env.get::() == crate::contract::MoveBandCursor::Hand; let mut part = pcx.part(MOVE_BAND, band).sense(craft_behavior::Sense::DRAG).pointer_only(reason); - if !os_bar { + if !os_bar && hand { part = part.cursor(CursorIcon::Grab).drag_cursor(CursorIcon::Grabbing); } if let Some(hit) = exclusive(WindowHit::Move).or(moves_window.then_some(WindowHit::Move)) { @@ -825,6 +831,7 @@ impl BodyHooks<'_> { } } let edges = match &props.mount { + _ if own_full_window => ResizeEdges::ALL, Mount::Layer(overlay) | Mount::Viewport { fallback: overlay, .. } => overlay.resize.edges, Mount::Window { resize } => resize.edges, _ => ResizeEdges::NONE, diff --git a/crates/ui-contract/src/contract/container.rs b/crates/ui-contract/src/contract/container.rs index cb3bef55fd..877b18a967 100644 --- a/crates/ui-contract/src/contract/container.rs +++ b/crates/ui-contract/src/contract/container.rs @@ -138,6 +138,8 @@ pub enum Pad { Control, /// `space.pad.regular`. Regular, + /// `space.pad.dialog`: a dialog frame. + Dialog, /// `space.pad.roomy`. Roomy, /// A full-window page's margin around its content: two and a half roomy pads (40 pt in the compact set), as a @@ -335,6 +337,20 @@ pub enum QuietHeader { Heads, } +/// The cursor over a header's move band ([`DragBand::Move`]). An app sets it once at its root (`RootEnv::values`); the +/// default is `Hand`. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, crate::runtime::env::EnvValue, crate::contract::MemoProps)] +#[env(style)] +#[non_exhaustive] +pub enum MoveBandCursor { + /// The open hand, and the closed hand while the band is dragged. + #[default] + Hand, + /// The arrow, as an OS title bar shows, also over the click-only controls on the band (menu titles, buttons): + /// production VectorCraft's title bar and panel headers. + Arrow, +} + /// A header region, filled by `Container::header`. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] #[non_exhaustive] @@ -779,6 +795,18 @@ pub enum Gap { CardRow, /// `space.gap.inline`: between groups of tools in a rail. Inline, + /// `size.page.gap.title`: between a page's title and its subtitle. + PageTitle, + /// `size.page.gap.lead`: between a page's title and subtitle and the actions under them. + PageLead, + /// `size.page.gap.actions`: between a page's New and Open. + PageActions, + /// `size.page.gap.section`: between the sections of a page's column. + PageSection, + /// `size.page.gap.heading`: between a page section's heading and its body. + PageHeading, + /// `size.page.gap.link`: between a page's links. + PageLink, } /// Set by a menu for its body: a horizontal divider takes `space.gap.inline` above and below its line, since the rows diff --git a/crates/ui-contract/src/contract/mod.rs b/crates/ui-contract/src/contract/mod.rs index 60c7bfd0c1..9e6f708120 100644 --- a/crates/ui-contract/src/contract/mod.rs +++ b/crates/ui-contract/src/contract/mod.rs @@ -69,8 +69,8 @@ pub use container::InBar; pub use container::InMenu; pub use container::{ BandFill, Bracket, Collapse, ContainerProps, DragBand, EndRegion, FooterPlace, FooterRegion, Gap, HeaderEdge, HeaderParts, HeaderRegion, - LeastWidth, Mount, Notch, POPUP_PAD, Pad, PadEdges, PaneEdge, QuietHeader, Scroll, ScrollAnchor, ScrollAxes, ScrollIndicator, SectionRhythm, - ShellPane, Sizing, ThemeScope, WrapWidth, + LeastWidth, Mount, MoveBandCursor, Notch, POPUP_PAD, Pad, PadEdges, PaneEdge, QuietHeader, Scroll, ScrollAnchor, ScrollAxes, ScrollIndicator, + SectionRhythm, ShellPane, Sizing, ThemeScope, WrapWidth, }; pub use craft_tracked::{PlainData, Revision, Tracked}; pub use craft_ui_macros::{CommandSet, Component, Pattern, PlainData, Props, register_contract}; diff --git a/crates/ui-contract/src/runtime/egui/areas.rs b/crates/ui-contract/src/runtime/egui/areas.rs index 107d48ea80..1a30412836 100644 --- a/crates/ui-contract/src/runtime/egui/areas.rs +++ b/crates/ui-contract/src/runtime/egui/areas.rs @@ -432,6 +432,11 @@ pub(crate) fn move_to_top(ctx: &Context, layer: LayerId) { ctx.move_to_top(layer); } +/// Whether egui showed `layer` in the last pass. +pub(crate) fn visible_last_frame(ctx: &Context, layer: LayerId) -> bool { + ctx.memory(|memory| memory.areas().visible_last_frame(&layer)) +} + /// Makes `layer` the modal layer of the running pass: layers below it take no input. pub(crate) fn set_modal_layer(ctx: &Context, layer: LayerId) { ctx.memory_mut(|memory| memory.set_modal_layer(layer)); diff --git a/crates/ui-contract/src/runtime/overlay.rs b/crates/ui-contract/src/runtime/overlay.rs index 90159f12f3..1d127d127e 100644 --- a/crates/ui-contract/src/runtime/overlay.rs +++ b/crates/ui-contract/src/runtime/overlay.rs @@ -315,6 +315,10 @@ pub(crate) struct Persist { held_open: IdSet, /// The root frame and pass each shown layer first ran its body in; gone with the layer's last entry. appeared: IdMap<(u64, u64)>, + /// The roots whose asked raise ran in a pass where a floating window (re)appeared: egui raises every layer that + /// shows again, and its area order keeps the old order among the layers raised in one pass, so the raise is asked + /// again in the next pass. + raise_again: Vec, } /// The closes queued and not yet taken, each with the root frame that queued it and whether it is carried: a carried @@ -874,7 +878,8 @@ pub(crate) fn end_pass(ctx: &Context) { with_pass(ctx, |pass| (pass.current.clone(), pass.last.iter().map(|entry| entry.id).collect::>(), pass.raise.clone())); let pressed = pointer::frame_raw(ctx).press.map(|press| press.origin); let now = pass::root_frame_nr(ctx); - let (order, to_top) = with_persist(ctx, viewport, |persist| { + let (order, to_top, floats, asked) = with_persist(ctx, viewport, |persist| { + let raise: Vec = std::mem::take(&mut persist.raise_again).into_iter().chain(raise).collect(); let stamp = |id: Id, persist: &mut Persist| { persist.counter += 1; persist.raised.insert(id, persist.counter); @@ -917,6 +922,7 @@ pub(crate) fn end_pass(ctx: &Context) { let mut order: Vec = Vec::new(); let mut listed: Vec = Vec::new(); let mut to_top: Vec = Vec::new(); + let mut floats: Vec = Vec::new(); persist.stack.clear(); for members in &families { for member in members { @@ -930,9 +936,12 @@ pub(crate) fn end_pass(ctx: &Context) { order.extend(member.cover); order.push(member.layer); listed.push(member.id); - } else if !member.window && members.first().is_some_and(|root| asked.contains(&root.id)) { - // An asked raise of a layer left to egui's area order raises it there, as a press on it does. - to_top.push(member.layer); + } else if !member.window { + floats.push(member.layer); + if members.first().is_some_and(|root| asked.contains(&root.id)) { + // An asked raise of a layer left to egui's area order raises it there, as a press on it does. + to_top.push(member.layer); + } } persist.stack.push(member.id); } @@ -959,11 +968,14 @@ pub(crate) fn end_pass(ctx: &Context) { .map(|(_, members)| { members.iter().flat_map(|member| std::iter::once(member.rect).chain(member.anchor).chain(member.peers.iter().copied())).collect() }); - (order, to_top) + (order, to_top, floats, asked) }); areas::set_layer_order(ctx, &order); - for layer in to_top { - areas::move_to_top(ctx, layer); + for layer in &to_top { + areas::move_to_top(ctx, *layer); + } + if !to_top.is_empty() && floats.iter().any(|layer| !areas::visible_last_frame(ctx, *layer)) { + with_persist(ctx, viewport, |persist| persist.raise_again = asked); } // An owner takes a close in the frame after the request at the latest; one nobody took is for a layer that is not shown. pass_state::with::(ctx, |closes| closes.0.retain(|(.., queued, carried)| *carried || queued + 1 >= now)); diff --git a/crates/ui-contract/src/style/cx.rs b/crates/ui-contract/src/style/cx.rs index 30d36336f3..d5ab7c55ea 100644 --- a/crates/ui-contract/src/style/cx.rs +++ b/crates/ui-contract/src/style/cx.rs @@ -405,6 +405,24 @@ impl<'a> StyleCx<'a> { } } + /// The height of a dialog's footer button at the ambient size: `size.dialog.button_height` at the medium size, grown + /// as a control's height is; a small button stands a small control high. + pub fn dialog_button_height(&self) -> f32 { + match self.size { + ControlSize::Sm => self.control().height, + ControlSize::Md => grown(self.tokens, self.tokens.size.dialog.button_height, self.line_ratio), + } + } + + /// The height of a menu row at the ambient size: `size.row.menu` at the medium size, grown as a control's height + /// is; a small row stands a small control high. + pub fn menu_row_height(&self) -> f32 { + match self.size { + ControlSize::Sm => self.control().height, + ControlSize::Md => grown(self.tokens, self.tokens.size.row.menu, self.line_ratio), + } + } + /// How the icon-only buttons of the scope show their glyph. pub fn glyph_role(&self) -> GlyphRole { self.glyphs diff --git a/crates/ui-contract/tests/it/runtime/window_move.rs b/crates/ui-contract/tests/it/runtime/window_move.rs index d022b9b126..74172d65a7 100644 --- a/crates/ui-contract/tests/it/runtime/window_move.rs +++ b/crates/ui-contract/tests/it/runtime/window_move.rs @@ -4,12 +4,15 @@ //! move band is reported once. use craft_behavior::{Cursor, CursorIcon}; -use craft_host::target::{ShellInfo, WindowChrome, WindowInfo, WindowKind}; +use craft_host::target::{Backend, Os, ShellInfo, WindowChrome, WindowInfo, WindowKind}; use craft_ui::contract::overlay::Resize; use craft_ui::contract::{ - BodyCx, Common, Component, Container, ContainerProps, Cx, DragBand, HeaderRegion, Mount, Props as _, Role, Show as _, ShowContainer as _, Sizing, + BodyCx, Common, Component, Container, ContainerProps, Cx, DragBand, HeaderRegion, Mount, Overlay, Props as _, Role, Show as _, + ShowContainer as _, Sizing, }; use craft_ui::runtime::InstallSpec; +use craft_ui::runtime::focus::FocusPolicy; +use craft_ui::runtime::windows::WindowSpec; use craft_ui::style::StyleCx; use craft_ui::testing::layout::allocate; use craft_ui::testing::pointer::{moved, press, release}; @@ -17,8 +20,9 @@ use craft_ui::testing::trial; use craft_ui::testing::windows::FakeSystem; use craft_ui_test_kit::contract::{PlainStyle, Probe, Seen}; use craft_ui_test_kit::windows::Windows; +use craft_window::policy::{Desktop, DesktopKind, Runtime, TitleBarPref}; use egui::viewport::ResizeDirection; -use egui::{Event, Pos2, Rect, Response, Ui, Vec2, ViewportCommand, pos2, vec2}; +use egui::{Event, Pos2, Rect, Response, Ui, Vec2, ViewportCommand, ViewportInfo, pos2, vec2}; use std::cell::{Cell, RefCell}; use std::sync::Arc; @@ -185,3 +189,32 @@ fn where_appkit_resizes_a_window_the_app_registers_no_grips_and_leaves_the_curso let cursor = craft_ui::runtime::cursor::current(&windows.ctx); assert!(matches!(cursor, None | Some(Cursor::System(CursorIcon::Default))), "over AppKit's edge the cursor is left to the OS: {cursor:?}"); } + +/// photocraft#16905: a full-window container (RAW Develop, Vanishing Point) in an OS window of its own, in a window the +/// app frames, moves by its title row and resizes by its edges. Its fallback overlay covers the main window and neither +/// moves nor resizes, and the window took that rule: no move band and no grips, so the window could not be moved. +#[trial] +fn a_full_window_container_in_its_own_window_moves_and_resizes_it() { + const WINDOW: Vec2 = Vec2::new(900.0, 640.0); + let desktop = Desktop { kind: DesktopKind::Other, ssd: None, gtk_theme: None, icon_theme: None }; + let integrated = + craft_window::policy::decide(Os::Linux, Runtime::Native, Backend::X11, &desktop, WindowKind::Main, TitleBarPref::Integrated, None); + let windows = Windows::with(InstallSpec::new(ShellInfo::default(), Arc::new(FakeSystem::new())).frame(integrated)); + let rig = Rig::new(Mount::viewport_with(Overlay::full_window(FocusPolicy::DIALOG), WindowSpec::dialog())); + let rect = Rect::from_min_size(Pos2::new(100.0, 100.0), WINDOW); + windows.child_info(ViewportInfo { + inner_rect: Some(rect), + outer_rect: Some(rect), + native_pixels_per_point: Some(1.0), + ..ViewportInfo::default() + }); + for _ in 0..4 { + rig.frame(&windows, vec![], vec![]); + } + let title = rig.header.get(); + assert!(title.is_positive(), "the title row showed"); + let sent = drag(pos2(title.center().x + 30.0, title.center().y), vec2(40.0, 20.0), |events| rig.frame(&windows, vec![], events)); + assert!(sent.contains(&ViewportCommand::StartDrag), "a drag of the title row moves the window: {sent:?}"); + let sent = drag(pos2(WINDOW.x - 1.0, WINDOW.y / 2.0), vec2(-20.0, 0.0), |events| rig.frame(&windows, vec![], events)); + assert_eq!(resizes(&sent), [ResizeDirection::East], "a drag of the right edge resizes the window: {sent:?}"); +} diff --git a/crates/ui-panels/src/dialog/frame.rs b/crates/ui-panels/src/dialog/frame.rs index be83544ae5..77a49830bf 100644 --- a/crates/ui-panels/src/dialog/frame.rs +++ b/crates/ui-panels/src/dialog/frame.rs @@ -278,7 +278,7 @@ pub const SIDE_BUTTONS: EndRegion = EndRegion::new().gap(REGION_GAP); /// `size.dialog.least` with paragraphs wrapping at `size.dialog.wrap`. A layer scrolls its body vertically unless the /// body is a collection; a frame in a parent's flow asks for the scroll itself. pub(crate) fn chrome_props() -> ContainerProps { - ContainerProps::new().surface(SurfaceKind::Dialog).pad(Pad::Regular).header(HEADER).least_width(LeastWidth::Dialog).wrap_width(WrapWidth::Dialog) + ContainerProps::new().surface(SurfaceKind::Dialog).pad(Pad::Dialog).header(HEADER).least_width(LeastWidth::Dialog).wrap_width(WrapWidth::Dialog) } /// The style of a dialog frame: the surface and padding come from the container. @@ -313,7 +313,7 @@ impl<'a> DialogFrame<'a> { /// The larger frame margin. #[must_use] pub fn roomy(mut self, on: bool) -> Self { - self.props = self.props.pad(if on { Pad::Roomy } else { Pad::Regular }); + self.props = self.props.pad(if on { Pad::Roomy } else { Pad::Dialog }); self } diff --git a/crates/ui-panels/src/dialog/modal.rs b/crates/ui-panels/src/dialog/modal.rs index 93ed9e84d8..3380d8c743 100644 --- a/crates/ui-panels/src/dialog/modal.rs +++ b/crates/ui-panels/src/dialog/modal.rs @@ -279,7 +279,7 @@ impl<'a> Dialog<'a> { /// The larger frame margin. #[must_use] pub fn roomy(mut self, on: bool) -> Self { - self.props = self.props.pad(if on { crate::contract::Pad::Roomy } else { crate::contract::Pad::Regular }); + self.props = self.props.pad(if on { crate::contract::Pad::Roomy } else { crate::contract::Pad::Dialog }); self } diff --git a/crates/ui-panels/src/docking/config.rs b/crates/ui-panels/src/docking/config.rs index be2d0180e6..22309ca23f 100644 --- a/crates/ui-panels/src/docking/config.rs +++ b/crates/ui-panels/src/docking/config.rs @@ -1,8 +1,8 @@ //! `DockConfig`: how a dock behaves, apart from how it looks (the dock's `ComponentStyle`) and what it says //! (`DockWords`). -use super::IconicMode; use super::targets::ZoneRule; +use super::{ColumnCards, IconicMode}; use crate::tabs::PanelTabLook; use craft_behavior::{DockSide, IconId}; @@ -82,13 +82,19 @@ pub struct DockConfig { /// sides ([`FloatingGroup::rounded_body`](super::FloatingGroup)): a floating tool rail reads as one rounded piece. /// Off: the panels and rails inside paint their own square surfaces to the window's edge. pub floating_rounded_body: bool, - /// Every docked column, expanded or collapsed to icons, shows as a card on the dock's `surface.background`: + /// Which docked columns show as cards on the dock's `surface.background` ([`ColumnCards`]), each /// painted `surface.panel` with `shape.radius.surface` corners and no frame, inset by `space.gap.stack` on its top /// and bottom and, for the column at the window edge, on its outer side; each further column stands /// `space.gap.tight` from its outer neighbour's card. A column is wider by its inset, so it keeps its content's /// width (a tool rail its steps); its dividers, drop bands and edge handle stay on its outer rect. Off: a column /// fills its cell. - pub column_cards: bool, + pub column_cards: ColumnCards, + /// Docks stand flush against the node beside them, with no gap, and their columns collapsed to icons show the + /// `line.border` frame expanded columns show, so one rule parts a dock from the canvas; the flyouts of those columns + /// stand square on the panel surface with that frame and no shadow ([`Flyout::docked`](super::Flyout::docked)): + /// VectorCraft 0.24's dock. + /// Off: a `space.gap.tight` gap of the window's background parts them. + pub flush_docks: bool, /// Shows a close button on the tabs of closable panels in docked and floating groups, where a middle click also /// closes them, for tabs that act as documents. Off: panels close from their menu. Accordion headers and iconic /// columns never show it. @@ -99,8 +105,9 @@ pub struct DockConfig { pub titled_headers: bool, /// The wheel over a tab strip shows the next or previous panel, one per wheel notch. pub wheel_selects_tabs: bool, - /// The look of the groups' panel tabs: the shown tab on the panel surface ([`PanelTabLook::Plain`]), or on a - /// filled rounded pill ([`PanelTabLook::Pill`]). + /// The look of the groups' panel tabs: the shown tab on the panel surface ([`PanelTabLook::Plain`]), on a + /// filled rounded pill ([`PanelTabLook::Pill`]), or a square filled block on a canvas strip + /// ([`PanelTabLook::Block`]). pub tab_look: PanelTabLook, /// A floating window opens in an OS window of its own where the window host opens OS windows and reports where /// they are on the desktop (not on Wayland) and its panels allow it (`PanelSpec::allow_native`). Elsewhere, and @@ -132,7 +139,8 @@ impl Default for DockConfig { close_button: true, floating_grip: false, floating_rounded_body: false, - column_cards: false, + column_cards: ColumnCards::None, + flush_docks: false, tab_close_buttons: false, titled_headers: false, wheel_selects_tabs: false, @@ -252,10 +260,10 @@ impl DockConfig { self } - /// Docked columns as cards on or off ([`column_cards`](Self::column_cards)). + /// Which docked columns show as cards ([`column_cards`](Self::column_cards)). #[must_use] - pub fn column_cards(mut self, on: bool) -> Self { - self.column_cards = on; + pub fn column_cards(mut self, cards: ColumnCards) -> Self { + self.column_cards = cards; self } @@ -266,6 +274,13 @@ impl DockConfig { self } + /// Flush docks on or off ([`flush_docks`](Self::flush_docks)). + #[must_use] + pub fn flush_docks(mut self, on: bool) -> Self { + self.flush_docks = on; + self + } + /// Close buttons on tabs on or off. #[must_use] pub fn tab_close_buttons(mut self, on: bool) -> Self { diff --git a/crates/ui-panels/src/docking/dock_column.rs b/crates/ui-panels/src/docking/dock_column.rs index 63c43fc3be..5747b69c5f 100644 --- a/crates/ui-panels/src/docking/dock_column.rs +++ b/crates/ui-panels/src/docking/dock_column.rs @@ -6,6 +6,7 @@ //! user did; the dock decides what a drop changes. use super::divider::{self, Divider, Drag}; +use super::group::strip_surface; use super::{CardInset, DividerKind, DockSizes, DockSpot, DockTargets, DockWords, DragUnit, PanelKey, PanelSpec, Splitter}; use crate::contract::{ Access, BodyCx, Common, Component, Container, ContainerProps, Cx, NoValue, Outcome, Pad, PaintUi, PartsCx, Pointer as _, Props as _, Role, @@ -15,6 +16,7 @@ use crate::menu::GroupItem; use crate::runtime::env::Label; use crate::runtime::focus::KeyUse; use crate::style::{ComponentStyle, Corners, StyleCx, SurfaceEdge, SurfaceKind, SurfaceStyle, UiTokens}; +use crate::tabs::PanelTabLook; use craft_behavior::divider::{self as push, Segment}; use craft_behavior::dock::{Column, DockEdge, Group}; use craft_behavior::{Axis, DockSide, Flow, Metrics, PartKey, Sense, Value}; @@ -205,6 +207,10 @@ pub struct DockColumn<'a, P: Value + Hash + 'static> { /// sit inside the card, inset by that on its outer side and by [`DockSizes::card`] on its top and bottom. #[prop] card: Option, + /// The look of the dock's panel tabs ([`DockConfig::tab_look`](super::DockConfig::tab_look)): the column's bar + /// lies on the surface the groups' tab strips do. + #[prop] + tab_look: PanelTabLook, /// The plan `parts` laid out this pass, which update, paint and access read. laid: Option, resized: Vec<(P, f32)>, @@ -229,6 +235,7 @@ impl<'a, P: Value + Hash + Debug + 'static> DockColumn<'a, P> { arrow: ColumnArrow::Collapse, within: Rect::NOTHING, card: None, + tab_look: PanelTabLook::Plain, laid: None, resized: Vec::new(), width: None, @@ -332,14 +339,28 @@ pub(crate) fn card_style(cx: &StyleCx<'_>) -> SurfaceStyle { SurfaceStyle { radius: UiTokens::corner(cx.tokens.shape.radius.surface), edge: SurfaceEdge::None, shadow: None, ..cx.surface(SurfaceKind::Panel) } } -/// Paints a column in `rect` whose content sits in `card`: the card over the dock's background where the column is -/// one, else the column's panel surface. -pub(crate) fn paint_card(ui: &mut PaintUi<'_>, rect: Rect, card: Rect, style: &SurfaceStyle) { +/// Paints a column in `rect` whose content sits in `card`, with its own `bar` if it has one, beside tabs in `look`: the +/// card over the dock's background where the column is one, else the column's panel surface; the bar on the surface +/// of the dock's strips. A card's bar is part of the card, unless the strips have a surface of their own +/// ([`PanelTabLook::Block`]): then it is a square strip across the card's top, and only the card's foot is rounded. +pub(crate) fn paint_card(ui: &mut PaintUi<'_>, rect: Rect, card: Rect, style: &SurfaceStyle, bar: Option, look: PanelTabLook) { + let strip = strip_surface(look); if card == rect { ui.draw().surface(rect, SurfaceKind::Panel, Corners::All); - } else { - ui.draw().surface(rect, SurfaceKind::Background, Corners::None); - ui.draw().surface_styled(card, style); + if let Some(bar) = bar { + ui.draw().surface(bar, strip, Corners::None); + } + return; + } + ui.draw().surface(rect, SurfaceKind::Background, Corners::None); + match bar.filter(|_| look == PanelTabLook::Block) { + Some(bar) => { + let mut foot = *style; + (foot.radius.nw, foot.radius.ne) = (0, 0); + ui.draw().surface_styled(card, &foot); + ui.draw().surface(bar, strip, Corners::None); + } + None => ui.draw().surface_styled(card, style), } } @@ -515,15 +536,10 @@ impl Component for DockColumn<'_, P> { let Some(plan) = self.laid.as_ref() else { return }; // Painted here, not as the container's surface, which lies over what `paint` draws. let card = self.inner(cx.rect, cx.flow.is_rtl(), &cx.style.sizes); - paint_card(ui, cx.rect, card, &cx.style.card); - if self.bar == ColumnBar::Own { - // A card's bar is part of the card. - if card == cx.rect { - ui.draw().surface(plan.bar, SurfaceKind::Background, Corners::None); - } - if self.arrow.shown() { - paint_chevron(ui, self.edge, self.arrow, true, cx.flow.is_rtl(), &cx.words::()); - } + let bar = (self.bar == ColumnBar::Own).then_some(plan.bar); + paint_card(ui, cx.rect, card, &cx.style.card, bar, self.tab_look); + if self.bar == ColumnBar::Own && self.arrow.shown() { + paint_chevron(ui, self.edge, self.arrow, true, cx.flow.is_rtl(), &cx.words::()); } } diff --git a/crates/ui-panels/src/docking/dock_column/stories.rs b/crates/ui-panels/src/docking/dock_column/stories.rs index 6fcd46121e..2da0a00d62 100644 --- a/crates/ui-panels/src/docking/dock_column/stories.rs +++ b/crates/ui-panels/src/docking/dock_column/stories.rs @@ -1,11 +1,12 @@ //! Stories of `DockColumn`. use crate::contract::{ShowContainer as _, Tracked}; -use crate::docking::{CardInset, ColumnBar, DockColumn, DockGrid, DockSizes, PanelSpec}; +use crate::docking::{CardInset, ColumnBar, ColumnCards, DockColumn, DockGrid, DockSizes, PanelSpec}; use crate::rails::tool::stories::{BRUSH, tools}; use crate::rails::{LastUsed, RailDensity, ToolRail, ToolSlot}; use crate::runtime::env::Env; use crate::sections::Panel; +use crate::tabs::PanelTabLook; use crate::testing::memory::global; use crate::testing::{Drive, StoryData, StoryOutput, story}; use craft_behavior::Flow; @@ -49,29 +50,30 @@ fn in_a_floating_window(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { /// A docked column of a tool rail at the window edge shown as a card (`DockConfig::column_cards`), at each rail density /// and one or two steps: inset on its outer, top and bottom sides, where the dock's background shows, with its bar and -/// its rail on the rounded panel card. The column is wider than its steps by the inset. +/// its rail on the rounded panel card. The column is wider than its steps by the inset. Beside block tabs +/// (`PanelTabLook::Block`, VectorCraft's) its bar is a square `surface.canvas` strip across the card's top. #[story(DockColumn<'static, u8>, covers = [], drive = Drive::Never)] fn a_tool_rail_card(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { let density = *data.choice("density", RailDensity::Dense, &[("Regular", RailDensity::Regular), ("Dense", RailDensity::Dense)]); let steps = *data.ranged("steps", 1_u16, 1.0..=2.0); + let look = *data.choice("tabs", PanelTabLook::Plain, &[("Plain", PanelTabLook::Plain), ("Block", PanelTabLook::Block)]); let slots = Tracked::new((0..4_u8).map(|slot| ToolSlot::new(u32::from(slot), tools(&[slot]))).collect::>()); let last = Tracked::new(LastUsed::default()); let cells = slots.len(); let spec = move |_: &u8| PanelSpec::new("Tools").grid(DockGrid::rail(cells).density(density)); let column = Column::new(vec![Group::new(vec![0], 0)]).with_steps(steps); - let sizes = DockSizes { column_cards: true, ..DockSizes::of_scope(ui) }; + let sizes = DockSizes { column_cards: ColumnCards::All, ..DockSizes::of_scope(ui) }; let width = sizes.natural(std::slice::from_ref(&column), &spec).first().map_or(0.0, |(width, _)| *width); let room = Flow::new(ui.available_rect_before_wrap(), Env::of(ui).direction.is_rtl()).span(0.0, width); let rect = room.with_max_y(room.top() + CARD_HEIGHT); // The column takes the cell a dock gives it, as high as the dock, whatever its rail's height. - let shown = DockColumn::new("Panels", global("dock column", "rail card story"), &column, &spec).card(CardInset::Edge).show_groups_at( - ui, - rect, - |_, rect, ui, _| { + let shown = DockColumn::new("Panels", global("dock column", "rail card story"), &column, &spec) + .card(CardInset::Edge) + .tab_look(look) + .show_groups_at(ui, rect, |_, rect, ui, _| { let rail = ToolRail::new("Tools", &slots, &BRUSH, &last).density(density); ui.scope_builder(UiBuilder::new().max_rect(rect), |ui| rail.show_rail(ui, |_, _| {})); - }, - ); + }); ui.advance_cursor_after_rect(rect); shown.into() } @@ -83,12 +85,12 @@ fn a_tool_rail_card(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { fn a_panel_column_card(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { let at = *data.choice("place", 0_usize, &[("At the window edge", 0), ("Inward of another column", 1)]); let column = Column::new(vec![Group::new(vec![0, 1], 0), Group::new(vec![2], 0)]); - let sizes = DockSizes { column_cards: true, ..DockSizes::of_scope(ui) }; - let inset = sizes.card_inset(at); + let sizes = DockSizes { column_cards: ColumnCards::All, ..DockSizes::of_scope(ui) }; + let inset = sizes.card_inset(at, &column, &spec); let room = Flow::new(ui.available_rect_before_wrap(), Env::of(ui).direction.is_rtl()).span(0.0, CARD_WIDTH + inset); let rect = room.with_max_y(room.top() + 2.0 * CARD_HEIGHT); let shown = DockColumn::new("Panels", global("dock column", "panel card story"), &column, &spec); - let shown = match sizes.card_place(at) { + let shown = match sizes.card_place(at, &column, &spec) { Some(place) => shown.card(place), None => shown, }; diff --git a/crates/ui-panels/src/docking/flyout.rs b/crates/ui-panels/src/docking/flyout.rs index 645360fbc5..af380bbe65 100644 --- a/crates/ui-panels/src/docking/flyout.rs +++ b/crates/ui-panels/src/docking/flyout.rs @@ -2,9 +2,10 @@ use crate::contract::overlay::{Anchor, Dismiss, FloatPlace, Outside, Place, PlacementChange, ResizeEdges}; use crate::contract::{ - BodyCx, Common, Component, Container, ContainerProps, Cx, Mount, NoValue, Outcome, Overlay, OverlayUi, Pad, PopupHandle, Role, SizeLimits, Sizing, + BodyCx, Common, Component, Container, ContainerProps, Cx, Mount, NoValue, Outcome, Overlay, OverlayUi, Pad, PaintUi, PopupHandle, Role, + SizeLimits, Sizing, }; -use crate::style::{ComponentStyle, StyleCx, SurfaceKind}; +use crate::style::{ComponentStyle, Corners, StyleCx, SurfaceKind}; use craft_behavior::overlay::Side; use craft_behavior::{Metrics, Sense}; use egui::{Pos2, Rect, Response, Ui, Vec2}; @@ -72,6 +73,8 @@ pub struct Flyout { /// The least size a resize leaves the flyout. #[prop(quantity = "least room a resize leaves, from the dock's measured sizes, in points")] least: Vec2, + /// The flyout stands as a docked column does: [`docked`](Flyout::docked). + docked: bool, placed: Option, } @@ -80,7 +83,19 @@ impl Flyout { /// `Side::End`), closing on a press outside it and when the focus leaves it if `auto_collapse`. pub fn new(opens: Side, size: Vec2, auto_collapse: bool) -> Self { let props = ContainerProps::new().surface(SurfaceKind::Popup).pad(Pad::None).sizing(Sizing::Content); - Flyout { common: Common::new(), props, opens, size, auto_collapse, within: Rect::EVERYTHING, least: Vec2::ZERO, placed: None } + Flyout { common: Common::new(), props, opens, size, auto_collapse, within: Rect::EVERYTHING, least: Vec2::ZERO, docked: false, placed: None } + } + + /// The flyout stands as a docked column does, in place of a popup's raised surface: square on `surface.panel`, with + /// the column's `line.border` frame and no shadow (the flyouts of a flush dock's columns, + /// [`DockConfig::flush_docks`](super::DockConfig::flush_docks)). + #[must_use] + pub fn docked(mut self, on: bool) -> Self { + if on { + self.props = self.props.surface(SurfaceKind::Panel); + } + self.docked = on; + self } /// The layer the flyout shows in, its top left at `top_left`: placed by the caller, resizable on every edge but @@ -155,6 +170,12 @@ impl Component for Flyout { Sense::empty() } + fn paint_over(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) { + if self.docked { + ui.draw().surface(cx.rect, SurfaceKind::Frame, Corners::None); + } + } + fn finish(self, cx: Cx<'_, Self>) -> FlyoutOutput { FlyoutOutput { response: cx.response.clone(), placed: self.placed } } diff --git a/crates/ui-panels/src/docking/group.rs b/crates/ui-panels/src/docking/group.rs index 395ab4a49f..29c277e8ac 100644 --- a/crates/ui-panels/src/docking/group.rs +++ b/crates/ui-panels/src/docking/group.rs @@ -46,7 +46,7 @@ pub struct GroupGripStyle { /// (photocraft#16426): ticks, dots or one level bar, how many, how large and how far apart; by default eleven upright ticks, a thin /// stroke wide, five points tall and a thin stroke apart. The marks keep their ink under the pointer. A toolbar's grip /// under its column bar and the grip above each icon group of a collapsed column paint the same marks, unless the app -/// separates icon groups by a rule (`IconGroupSeparator::Rule`). +/// separates icon groups by a rule (`IconGroupSeparator::Rule`), where the groups have no grip strips. #[derive(Clone, Copy, Debug, PartialEq)] pub(super) struct GripMarks { ink: StyleColor, @@ -372,8 +372,7 @@ pub struct DockGroup<'a, P: Clone + Hash + Send + Sync + 'static> { /// The wheel over the tabs shows the next or previous panel, one per wheel notch. #[prop(flag)] wheel_selects_tabs: bool, - /// The look of the tabs ([`DockConfig::tab_look`](super::DockConfig::tab_look)). - #[prop] + /// The look of the tabs: [`tab_look`](DockGroup::tab_look). tab_look: PanelTabLook, /// The header shows the shown panel's title (with its count) and a close button in place of the tab strip, as a /// single titled panel does: the panels are shown from a rail, not by tabs. @@ -422,8 +421,10 @@ impl<'a, P: Clone + Hash + Send + Sync + PartialEq + Debug + 'static> DockGroup< /// The group named by `anchor` (one of its panels) with its `panels`, `active` showing. The group is named by the /// active panel's title. pub fn new(anchor: P, panels: Titles, active: PanelKey) -> Self { - let props = - ContainerProps::new().sizing(Sizing::Fill).header(HeaderRegion::new().fill(SurfaceKind::Background)).command_scope(DockCommands::SCOPE); + let props = ContainerProps::new() + .sizing(Sizing::Fill) + .header(HeaderRegion::new().fill(strip_surface(PanelTabLook::Plain))) + .command_scope(DockCommands::SCOPE); let title = panels.as_slice().iter().find(|panel| panel.key == active).map(|panel| panel.title.clone()).unwrap_or_default(); DockGroup { common: Common::new(), @@ -472,6 +473,15 @@ impl<'a, P: Clone + Hash + Send + Sync + PartialEq + Debug + 'static> DockGroup< DockGroup { take_focus: true, ..self } } + /// The look of the tabs ([`DockConfig::tab_look`](super::DockConfig::tab_look)). [`PanelTabLook::Block`] tabs + /// lie on a strip of `surface.canvas`, the others on the window's background. + #[must_use] + pub fn tab_look(mut self, look: PanelTabLook) -> Self { + self.props = self.props.header(HeaderRegion::new().fill(strip_surface(look))); + self.tab_look = look; + self + } + /// Whether the panel menu button shows: it is asked for and the group has a menu. fn shows_menu_button(&self) -> bool { self.panel_menu_shown && self.menu.is_some() @@ -505,7 +515,7 @@ impl Component for /// The band the group is dragged by and the panel menu button, at the end of the header: the band first. The /// button sits at the strip's top, level with the tab labels' caps, as the "…" of the old tab strips did; beside - /// [`PanelTabLook::Pill`] tabs, in the strip's middle with their pills. + /// [`PanelTabLook::Pill`] and [`PanelTabLook::Block`] tabs, in the strip's middle. fn parts(&mut self, _: Rect, cx: &mut PartsCx<'_, Self>) { let Some(slot) = cx.header_slot(HeaderEdge::End) else { return }; let words = cx.words::(); @@ -518,7 +528,7 @@ impl Component for let side = (slot.width() - grip_width(cx.tokens) - cx.tokens.space.gap.item).max(0.0); let end = rest.take_end(side).0; let height = side.min(slot.height()); - let top = if self.tab_look == PanelTabLook::Pill { slot.center().y - height / 2.0 } else { slot.top() }; + let top = if self.tab_look == PanelTabLook::Plain { slot.top() } else { slot.center().y - height / 2.0 }; let button = Rect::from_min_size(egui::Pos2::new(end.left(), top), Vec2::new(end.width(), height)); let _ = cx .header_part(HeaderEdge::End, MENU, button) @@ -825,6 +835,11 @@ enum TabEvent { DragStarted, } +/// The surface a dock's strips lie on with tabs in `look`: its groups' tab strips and its columns' bars. +pub(crate) fn strip_surface(look: PanelTabLook) -> SurfaceKind { + if look == PanelTabLook::Block { SurfaceKind::Canvas } else { SurfaceKind::Background } +} + /// The props of a group's tab row: the tabs and how they show, the group's size where a tab's drag starts, and the /// outbox for what the user did. #[derive(MemoProps)] diff --git a/crates/ui-panels/src/docking/iconic.rs b/crates/ui-panels/src/docking/iconic.rs index e3d2fe758c..f33dc4557b 100644 --- a/crates/ui-panels/src/docking/iconic.rs +++ b/crates/ui-panels/src/docking/iconic.rs @@ -7,7 +7,7 @@ use super::dock_column::{ }; use super::group::GripMarks; use super::{CardInset, DockSizes, DockSpot, DockTargets, DockWords, DragUnit, Flyout, GroupAt, PanelKey, PanelSpec, Splitter, start_icon_drag}; -use crate::buttons::IconButton; +use crate::buttons::{ActiveLook, IconButton}; use crate::contract::overlay::Anchor; use crate::contract::{ Access, Bind, BindMut, BodyCx, Common, Component, Container, ContainerProps, Cx, Edit as _, EditResponse, HeaderEdge, HeaderParts, HeaderRegion, @@ -16,9 +16,10 @@ use crate::contract::{ }; use crate::menu::GroupItem; use crate::primitives::{IconSpec, TextRun}; -use crate::runtime::env::{EnvValue, Label}; +use crate::runtime::env::{Env, EnvValue, Label, with_env}; use crate::runtime::focus::KeyUse; use crate::style::{ComponentStyle, Corners, GlyphRole, RuleKind, StyleColor, StyleCx, SurfaceKind, SurfaceStyle}; +use crate::tabs::PanelTabLook; use craft_behavior::dock::{Column, DockEdge, Group}; use craft_behavior::overlay::Side; use craft_behavior::{Axis, CursorIcon, DockSide, Metrics, PartKey, PressPhase, Sense, Value}; @@ -45,9 +46,14 @@ pub struct IconicSizes { pub column: DockSizes, /// The height of an icon cell (the rail button). pub cell: f32, - /// The height of the grip strip at the top of each icon group, above its first icon. + /// The height of the grip strip at the top of each icon group, above its first icon: none with + /// [`IconGroupSeparator::Rule`]. pub grip: f32, - /// The room between two icon groups. + /// How far a group's grip band reaches into its first icon: none with [`IconGroupSeparator::Grip`], whose strip is + /// the band, `space.gap.inline` with [`IconGroupSeparator::Rule`]. + pub band: f32, + /// The room between two icon groups: the tight gap, or with [`IconGroupSeparator::Rule`] the stack gap and the + /// rule. pub separator: f32, /// The column width from which each cell shows its panel's name beside its icon. pub labels: f32, @@ -60,13 +66,12 @@ impl IconicSizes { /// The sizes of the style context `cx`. pub fn style(cx: &StyleCx<'_>) -> Self { let size = &cx.tokens.size; - IconicSizes { - column: DockSizes::style(cx), - cell: size.rail.button, - grip: super::group::grip_strip(cx.tokens), - separator: cx.tokens.space.gap.tight, - labels: size.rail.width * LABELS_IN_RAIL_WIDTHS, - } + let gap = &cx.tokens.space.gap; + let (grip, band, separator) = match cx.env::() { + IconGroupSeparator::Grip => (super::group::grip_strip(cx.tokens), 0.0, gap.tight), + IconGroupSeparator::Rule => (0.0, gap.inline, gap.stack + cx.rule(RuleKind::Edge).width.points(cx.frame_ctx().pixels_per_point())), + }; + IconicSizes { column: DockSizes::style(cx), cell: size.rail.button, grip, band, separator, labels: size.rail.width * LABELS_IN_RAIL_WIDTHS } } /// The sizes in the root scope's style, for code outside a style pass: @@ -97,17 +102,20 @@ pub enum IconicMode { Rail, } -/// What marks the icon groups of a collapsed column apart. An app sets it once at its root (`RootEnv::values`). Either -/// way each group keeps its grip strip above its first icon, which drags the group. +/// What marks the icon groups of a collapsed column apart. An app sets it once at its root (`RootEnv::values`). #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, EnvValue, crate::contract::MemoProps)] #[env(style)] #[non_exhaustive] pub enum IconGroupSeparator { - /// Each group's grip strip shows the dock's grip marks (`shape.grip`, in `line.grip`). + /// Each group has a grip strip above its first icon, which shows the dock's grip marks (`shape.grip`, in + /// `line.grip`) and drags the group. #[default] Grip, - /// The grip strips are bare, and an edge rule (`line.border`) lies level across the room between two groups, - /// `space.gap.inline` short of the column's sides: VectorCraft's icon groups, as production drew them. + /// No grip strips: a group's first icon stands right under the column's bar, and an edge rule (`line.border`) lies + /// level in the middle of the `space.gap.stack` between two groups, `space.gap.inline` short of the column's sides. + /// A bare band drags the group: the first group's top `space.gap.inline` of its first icon, a later group's room + /// above it and that much of its first icon. The band takes a press there, so a click in it opens no flyout; + /// below it the icon drags its own panel. VectorCraft's icon groups, as production drew them. Rule, } @@ -248,6 +256,14 @@ pub struct IconicColumn<'a, P: Value + Hash + 'static> { /// sit inside the card, inset by that on its outer side and by [`DockSizes::card`] on its top and bottom. #[prop] card: Option, + /// The look of the dock's panel tabs ([`DockConfig::tab_look`](super::DockConfig::tab_look)): the column's bar + /// lies on the surface the groups' tab strips do. + #[prop] + tab_look: PanelTabLook, + /// The docked column shows the `line.border` frame an expanded docked column shows, and its flyouts stand as docked + /// columns do ([`Flyout::docked`], [`DockConfig::flush_docks`](super::DockConfig::flush_docks)). + #[prop] + framed: bool, open: Bind<'a, Option

>, view: Option>, /// The bar's rect this pass. @@ -285,7 +301,7 @@ struct Plan { cells: Vec<(usize, usize, Rect)>, /// The rest of each row in a wide column, where the panel's name shows; empty in a narrow column. names: Vec, - /// `(group, rect)` of each group's grip strip, above its first icon. + /// `(group, rect)` of each group's grip: its strip above its first icon, or its band (`IconicSizes::band`). grips: Vec<(usize, Rect)>, /// `(group, rect)` of the whole of each group: its grip strip and its cells. groups: Vec<(usize, Rect)>, @@ -310,6 +326,8 @@ impl<'a, P: Value + Hash + Debug + 'static> IconicColumn<'a, P> { mode: IconicMode::Flyouts, within: Rect::NOTHING, card: None, + tab_look: PanelTabLook::Plain, + framed: false, open, view: None, bar_rect: Rect::NOTHING, @@ -328,25 +346,55 @@ impl<'a, P: Value + Hash + Debug + 'static> IconicColumn<'a, P> { /// Shows the column; `view` measures the group of an open flyout at the width it gets and returns its height /// (`None` takes the flyout's least height), then shows it in the rect it gets. pub fn show_flyouts( - mut self, + self, ui: &mut Ui, view: impl FnMut(&Group

, GroupAt, &mut Ui, &mut BodyCx<'_>) -> Option + 'a, ) -> IconicColumnOutput

{ - self.view = Some(Box::new(view)); - self.show(ui, |_, _| ()).output + self.in_look(ui, view, |column, ui| column.show(ui, |_, _| ()).output) } /// Shows the column at `rect` with no allocation, so its paint is clipped by the dock and not by a region of its /// own: the accent line of its edge reaches into the gutter beside it. #[doc(hidden)] pub fn show_flyouts_at( - mut self, + self, ui: &mut Ui, rect: Rect, view: impl FnMut(&Group

, GroupAt, &mut Ui, &mut BodyCx<'_>) -> Option + 'a, ) -> IconicColumnOutput

{ - self.view = Some(Box::new(view)); - self.show_at(ui, rect, |_, _| ()).output + self.in_look(ui, view, |column, ui| column.show_at(ui, rect, |_, _| ()).output) + } + + /// Shows the column through `show` with its flyouts' `view`. Beside [`PanelTabLook::Block`] tabs the open panel's + /// icon shows on `surface.control`, as the shown tab does ([`ActiveLook::Control`]); the flyouts' groups keep the + /// active look around the column. + fn in_look( + mut self, + ui: &mut Ui, + mut view: impl FnMut(&Group

, GroupAt, &mut Ui, &mut BodyCx<'_>) -> Option + 'a, + show: impl FnOnce(Self, &mut Ui) -> IconicColumnOutput

, + ) -> IconicColumnOutput

{ + if self.tab_look != PanelTabLook::Block { + self.view = Some(Box::new(view)); + return show(self, ui); + } + let outer = Env::of(ui).get::(); + self.view = Some(Box::new(move |group, at, ui, body| { + with_env( + ui, + |overrides| { + overrides.values.set(outer); + }, + |ui| view(group, at, ui, body), + ) + })); + with_env( + ui, + |overrides| { + overrides.values.set(ActiveLook::Control); + }, + |ui| show(self, ui), + ) } /// Whether the column is a rail beside its expanded column: its chevron collapses the column. @@ -413,12 +461,14 @@ impl<'a, P: Value + Hash + Debug + 'static> IconicColumn<'a, P> { let wide = body.width() >= sizes.labels; let (mut y, mut cells, mut names, mut grips, mut groups) = (body.top(), Vec::new(), Vec::new(), Vec::new(), Vec::new()); for (at, group) in self.column.groups.iter().enumerate() { + let above = y; if at > 0 { y += sizes.separator; } let top = y; - let grip = Rect::from_min_max(Pos2::new(body.left(), top), Pos2::new(body.right(), top + sizes.grip)); - y = grip.bottom(); + y = top + sizes.grip; + // The grip strip, or a band that reaches into the first icon and covers the room above the group. + let band = if sizes.band > 0.0 { above..=y + sizes.band } else { top..=y }; for panel in 0..group.panels.len() { let row = Rect::from_min_size(Pos2::new(body.left(), y), Vec2::new(body.width(), sizes.cell)); if wide { @@ -430,7 +480,7 @@ impl<'a, P: Value + Hash + Debug + 'static> IconicColumn<'a, P> { } y += sizes.cell; } - grips.push((at, grip)); + grips.push((at, Rect::from_x_y_ranges(body.x_range(), *band.start()..=band.end().min(y)))); groups.push((at, Rect::from_min_max(Pos2::new(body.left(), top), Pos2::new(body.right(), y)))); } Plan { bar, cells, names, grips, groups, body } @@ -550,6 +600,8 @@ impl Component for IconicColumn<'_, P> { cx.part(GRIP.at(*group as u64), *grip) .sense(Sense::DRAG) .exact_hit() + // A band over the first icon's top takes the press there, as production's, drawn after the icons, did. + .stacking(u32::from(sizes.band > 0.0)) .cursor(CursorIcon::Grab) .drag_cursor(CursorIcon::Grabbing) .pointer_only("Move Panel To in the panel menu moves the group's panels"); @@ -649,12 +701,9 @@ impl Component for IconicColumn<'_, P> { fn paint(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) { // Painted here, not as the container's surface, which lies over what `paint` draws. let card = card_rect(cx.rect, self.card, &cx.style.sizes.column, self.edge, cx.flow.is_rtl()); - paint_card(ui, cx.rect, card, &cx.style.card); + let bar = (self.bar == ColumnBar::Own).then_some(self.bar_rect); + paint_card(ui, cx.rect, card, &cx.style.card, bar, self.tab_look); if self.bar == ColumnBar::Own { - // A card's bar is part of the card. - if self.card.is_none() { - ui.draw().surface(self.bar_rect, SurfaceKind::Background, Corners::None); - } paint_chevron(ui, self.edge, ColumnArrow::Collapse, self.expanded(), cx.flow.is_rtl(), &cx.words::()); } let flat = self.flat(); @@ -686,13 +735,16 @@ impl Component for IconicColumn<'_, P> { IconGroupSeparator::Rule => { let xs = plan.body.x_range().shrink(style.rule_inset); // In the middle of the room from a group's last icon to the next group's first. - for ((_, above), (_, strip)) in plan.groups.iter().zip(plan.grips.iter().skip(1)) { - let y = (above.bottom() + strip.bottom()) / 2.0; + for pair in plan.groups.windows(2) { + let y = (pair[0].1.bottom() + pair[1].1.top()) / 2.0; ui.draw().rule(RuleKind::Edge, Pos2::new(xs.min, y), Pos2::new(xs.max, y)); } } } } + if self.framed { + ui.draw().surface(cx.rect, SurfaceKind::Frame, Corners::None); + } // The edge's line lies on the column's inner edge; its handle stays inside the column. A floating window's // edges are the window's. if self.bar == ColumnBar::Own { @@ -747,7 +799,7 @@ impl Component for IconicColumn<'_, P> { let mut resized = None; for (at, plan) in plans.into_iter().enumerate() { let Some(FlyoutPlan { group, top_left, size, fixed, icons_top }) = plan else { continue }; - let shown = Flyout::new(opens, size, auto_collapse).within(bounds).least(least).show_popup( + let shown = Flyout::new(opens, size, auto_collapse).within(bounds).least(least).docked(self.framed).show_popup( ui, popup.at(at), Anchor::Point(top_left), diff --git a/crates/ui-panels/src/docking/iconic/stories.rs b/crates/ui-panels/src/docking/iconic/stories.rs index 29171652a8..6b085de17c 100644 --- a/crates/ui-panels/src/docking/iconic/stories.rs +++ b/crates/ui-panels/src/docking/iconic/stories.rs @@ -4,10 +4,11 @@ use super::CELL; use crate::buttons::Button; use crate::contract::ShowContainer as _; use crate::contract::{Bind, BodyCx, Show as _, Validity}; -use crate::docking::{ColumnBar, DockSizes, GroupAt, IconGroupSeparator, IconicColumn, IconicColumnOutput, IconicMode, PanelSpec}; +use crate::docking::{ColumnBar, ColumnCards, DockSizes, GroupAt, IconGroupSeparator, IconicColumn, IconicColumnOutput, IconicMode, PanelSpec}; use crate::runtime::commands::{CommandState, CommandStates}; use crate::runtime::env::{Env, Message, with_env}; use crate::sections::Panel; +use crate::tabs::PanelTabLook; use crate::testing::memory::global; use crate::testing::{Drive, Fixture, StoryData, StoryOutput, stage, story}; use craft_behavior::Mixed; @@ -97,11 +98,12 @@ fn icon_groups(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { #[story(IconicColumn<'static, u8>, covers = [], drive = Drive::Never)] fn icons_as_a_card(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { let at = *data.choice("place", 1_usize, &[("At the window edge", 0), ("Inward of another column", 1)]); - let sizes = DockSizes { column_cards: true, ..DockSizes::of_scope(ui) }; - let inset = sizes.card_inset(at); + let sizes = DockSizes { column_cards: ColumnCards::All, ..DockSizes::of_scope(ui) }; let column = Column::new(vec![Group::new(vec![0, 1], 0), Group::new(vec![2], 0)]); + let inset = sizes.card_inset(at, &column, &spec); + let card = sizes.card_place(at, &column, &spec); let column = IconicColumn::new("Panels", global("iconic column", "card story"), &column, Bind::kept(), &spec); - let column = match sizes.card_place(at) { + let column = match card { Some(place) => column.card(place), None => column, }; @@ -114,7 +116,7 @@ fn icons_as_a_card(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { .into() } -/// The icon groups of an app that sets `IconGroupSeparator::Rule` at its root (VectorCraft's): bare grip strips, and an +/// The icon groups of an app that sets `IconGroupSeparator::Rule` at its root (VectorCraft's): no grip strips, and an /// edge rule across the room between two groups. #[story(IconicColumn<'static, u8>, covers = [], drive = Drive::Never, title = "Icon groups apart by a rule")] fn icon_groups_apart_by_a_rule(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { @@ -232,3 +234,22 @@ fn a_flyout_of_a_panel_not_in_the_column(ui: &mut Ui, data: &mut StoryData) -> S }; flyout_of(ui, open_at.bind(open).check(in_column)) } + +/// A column of VectorCraft 0.24's dock (`DockConfig::flush_docks`, `PanelTabLook::Block`): framed in `line.border`, its +/// bar on `surface.canvas`, the open panel's icon on `surface.control`, and its flyout square on the panel surface with +/// the same frame and no shadow. The flyout opens from its icon. +#[story(IconicColumn<'static, u8>, covers = [], drive = Drive::Custom(open_first_flyout), title = "A flush dock's column and its flyout")] +fn a_flush_docks_column_and_its_flyout(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + let (open, open_at) = data.value_at("open", None::); + let column = Column::new(vec![Group::new(vec![0, 1], 0), Group::new(vec![2], 0)]); + let column = IconicColumn::new("Panels", global("iconic column", "flush story"), &column, open_at.bind(open), &spec) + .framed(true) + .tab_look(PanelTabLook::Block); + at_stage(ui, column, |group, at, ui, _| { + let GroupAt::Show(rect) = at else { return None }; + let title = group.active_panel().map_or_else(String::new, |panel| spec(panel).label.as_str().to_owned()); + Panel::new(title).titled().show_at(ui, rect, |_, _| ()); + None + }) + .into() +} diff --git a/crates/ui-panels/src/docking/iconic/trials.rs b/crates/ui-panels/src/docking/iconic/trials.rs index b3d65d6652..3e1ce73cdc 100644 --- a/crates/ui-panels/src/docking/iconic/trials.rs +++ b/crates/ui-panels/src/docking/iconic/trials.rs @@ -18,13 +18,14 @@ use crate::runtime::focus::{FocusTarget, request}; use crate::runtime::frame::take_output; use crate::sections::Panel; use crate::style::StyleCx; +use crate::tabs::PanelTabLook; use crate::testing::memory::global; use crate::testing::relations::{equals_token, grows_with}; use crate::testing::{Fixture, trial}; use craft_behavior::DockSide; use craft_behavior::dock::{Action, Column, DockEdge, Group, Layout, Node}; use craft_behavior::overlay::Side; -use egui::{Key, Modifiers, Pos2, Rect, UiBuilder, Vec2}; +use egui::{Id, Key, Modifiers, Pos2, Rect, UiBuilder, Vec2}; use std::cell::{Cell, RefCell}; use std::rc::Rc; @@ -662,30 +663,47 @@ fn a_themes_bar_grip_is_one_level_bar() { assert!((bar.center().x - strip.center().x).abs() <= 0.5, "centred across the strip: {bar:?} in {strip:?}"); } -/// An app's `IconGroupSeparator::Rule` (VectorCraft's): the grip strips show no marks, and one level edge rule lies in -/// the room between the two groups, under the first group's last icon and over the second group's first, short of the -/// column's sides; none lies over the first group. -#[trial] -fn icon_groups_apart_by_a_rule_show_one_level_rule_between_them() { - let mut fixture = Fixture::hosted(|ui| { +/// The icons of the two groups of a collapsed column `width` wide whose groups stand apart by `separator`: the fixture, +/// the column's id and the panel whose flyout is open. +fn separated(separator: IconGroupSeparator, width: f32) -> (Fixture, Id, Rc>>) { + let open = Rc::new(Cell::new(None)); + let seen = Rc::clone(&open); + let mut fixture = Fixture::hosted(move |ui| { let mut column = Column::new(vec![Group::new(vec![1, 2], 0), Group::new(vec![3], 0)]); column.iconic = true; - let place = Rect::from_min_size(Pos2::ZERO, Vec2::new(RAIL, SCREEN.y)); - with_env( - ui, - |overrides| { - overrides.values.set(IconGroupSeparator::Rule); - }, - |ui| { - let output = IconicColumn::new("Panels", global("iconic column", "rule"), &column, Bind::kept(), &named) - .within(screen()) - .show_flyouts_at(ui, place, |_, _, _, _| None); - Some(output.into()) - }, - ) + let place = Rect::from_min_size(Pos2::ZERO, Vec2::new(width, SCREEN.y)); + let mut now = seen.get(); + let output = + with_env( + ui, + |overrides| { + overrides.values.set(separator); + }, + |ui| { + IconicColumn::new("Panels", global("iconic column", "rule"), &column, Bind::bound(&mut now), &named) + .within(screen()) + .show_flyouts_at(ui, place, |_, _, _, _| None) + }, + ); + seen.set(now); + Some(output.into()) }); fixture.room(SCREEN).settle(); let id = fixture.root_id().expect("the column shows"); + (fixture, id, open) +} + +/// An app's `IconGroupSeparator::Rule` (VectorCraft's): no grip strips, so the first icon stands higher than under grip +/// strips; one level edge rule lies in the middle of the room between the two groups, short of the column's sides, and +/// none over the first group. Each group keeps a bare grip band, as production's: the first group's over its first +/// icon's top edge, a later group's over the room above it and its first icon's top edge. A drag from a band moves the +/// group, from an icon below the band, the first included, only that icon's panel; a click in the band opens no flyout +/// (the band takes the press there, as production's did), a click below it does, in a narrow and in a wide column. +#[trial] +fn icon_groups_apart_by_a_rule_show_one_level_rule_between_them() { + let (gripped, gripped_id, _) = separated(IconGroupSeparator::Grip, RAIL); + let gripped_first = gripped.part_rect(gripped_id, CELL.at(0)).expect("the first icon under grips"); + let (mut fixture, id, _) = separated(IconGroupSeparator::Rule, RAIL); let border = StyleCx::with_root(fixture.ctx(), |cx| cx.tokens.color.line.border); let shapes = fixture.frame_shapes(); let level: Vec<(Pos2, Pos2, egui::Color32)> = shapes @@ -695,21 +713,134 @@ fn icon_groups_apart_by_a_rule_show_one_level_rule_between_them() { _ => None, }) .collect(); - for group in [0, 1] { - let strip = fixture.part_rect(id, GRIP.at(group)).expect("each group keeps its grip"); - assert!(grip_ticks(&shapes, strip).is_none(), "group {group}: the strip shows no marks"); + let cell = |at: u64| fixture.part_rect(id, CELL.at(at)).expect("the icon shows"); + let band = |group: u64| fixture.part_rect(id, GRIP.at(group)).expect("each group keeps a grip band"); + let (first, last, next) = (cell(0), cell(1), cell(2)); + let (top, lower) = (band(0), band(1)); + assert!(first.top() < gripped_first.top(), "the first icon {first:?} stands higher than under a grip strip {gripped_first:?}"); + for (group, band) in [top, lower].into_iter().enumerate() { + assert!(grip_ticks(&shapes, band).is_none(), "group {group}: the band shows no marks"); } - let first = fixture.part_rect(id, GRIP.at(0)).expect("the first group's grip"); - assert!(!level.iter().any(|(a, _, _)| first.y_range().contains(a.y)), "no rule over the first group: {level:?}"); - let (last, next) = ( - fixture.part_rect(id, CELL.at(1)).expect("the first group's last icon"), - fixture.part_rect(id, CELL.at(2)).expect("the second group's icon"), + assert!( + near(top.top(), first.top()) && top.bottom() > first.top() && top.bottom() < first.center().y, + "the first band {top:?} is the top edge of {first:?}" ); + assert!( + near(lower.top(), last.bottom()) && lower.bottom() > next.top() && lower.bottom() < next.center().y, + "the later band {lower:?} covers the room from {last:?} and the top edge of {next:?}" + ); + assert!(!level.iter().any(|(a, _, _)| a.y < first.bottom()), "no rule over the first group: {level:?}"); let between: Vec<_> = level.iter().filter(|(a, _, _)| a.y > last.bottom() && a.y < next.top()).collect(); let [(a, b, ink)] = between.as_slice() else { panic!("one rule between the groups: {level:?}") }; + let middle = (last.bottom() + next.top()) / 2.0; + assert!(near(a.y, middle), "the rule {a:?} lies in the middle of the room from {last:?} to {next:?}"); let (left, right) = (a.x.min(b.x), a.x.max(b.x)); let span = right - left; assert!(left > 0.0 && right < RAIL && span > RAIL - span, "the rule reaches across the column, short of its sides: {a:?} to {b:?}"); let [r, g, bl, al] = border.0; assert_eq!(*ink, egui::Color32::from_rgba_unmultiplied(r, g, bl, al), "the rule is in line.border"); + for width in [RAIL, WIDE_COLUMN] { + let (mut fixture, id, open) = separated(IconGroupSeparator::Rule, width); + let cell = |at: u64| fixture.part_rect(id, CELL.at(at)).expect("the icon shows"); + let band = |group: u64| fixture.part_rect(id, GRIP.at(group)).expect("each group keeps a grip band"); + let (first, last, next, top, lower) = (cell(0), cell(1), cell(2), band(0), band(1)); + let in_top = Pos2::new(first.center().x, top.center().y); + let drags = [ + (in_top, DragUnit::Group(1)), + (Pos2::new(next.center().x, (last.bottom() + next.top()) / 2.0), DragUnit::Group(3)), + (Pos2::new(next.center().x, (next.top() + lower.bottom()) / 2.0), DragUnit::Group(3)), + (first.center(), DragUnit::Panel(1)), + (last.center(), DragUnit::Panel(2)), + (next.center(), DragUnit::Panel(3)), + ]; + for (from, unit) in drags { + fixture.drag_hold_at(from, Vec2::new(SCREEN.x / 2.0, 0.0)); + let dragged = drag::active::>(fixture.ctx()).map(|drag| drag.unit.clone()); + assert_eq!(dragged, Some(unit.clone()), "{width} wide: a drag from {from:?} moves {unit:?}"); + fixture.release_at(from + Vec2::new(SCREEN.x / 2.0, 0.0)).settle(); + } + fixture.click_at(in_top).idle(3); + assert_eq!(open.get(), None, "{width} wide: a click in the band opens no flyout"); + fixture.click_at(first.center()).idle(3); + assert_eq!(open.get(), Some(1), "{width} wide: a click on the first icon below the band opens its flyout"); + } +} + +/// The surface shapes painted around the open flyout of a column that is `framed` (a flush dock's): the rects whose +/// rect holds the flyout's body. +fn flyout_surfaces(framed: bool) -> Vec { + let shown: Rc>> = Rc::default(); + let seen = Rc::clone(&shown); + let mut fixture = Fixture::new(move |ui| { + let column = Column::new(vec![Group::new(vec![0, 1], 0)]); + let mut open = Some(0_u8); + IconicColumn::new("Panels", global("iconic column", "docked flyout"), &column, Bind::bound(&mut open), &spec).framed(framed).show_flyouts( + ui, + |_, at, ui, _| { + let GroupAt::Show(rect) = at else { return None }; + seen.set(Some(rect)); + Panel::new("Flyout").show_at(ui, rect, |_, _| ()); + None + }, + ); + }); + fixture.room(Vec2::new(RAIL, 300.0)).settle(); + let body = shown.get().expect("the flyout shows"); + fixture + .frame_shapes() + .into_iter() + .filter_map(|shape| match shape { + egui::Shape::Rect(rect) if rect.rect.expand(EPS).contains_rect(body) && rect.rect.width() < body.width() + RAIL => Some(rect), + _ => None, + }) + .collect() +} + +/// The flyout of a flush dock's column (`DockConfig::flush_docks`, VectorCraft's) stands as a docked column does: +/// square, with no shadow; a column of another dock opens a raised popup with rounded corners. +#[trial] +fn a_flush_docks_flyout_stands_square_with_no_shadow() { + let raised = flyout_surfaces(false); + assert!(raised.iter().any(|rect| rect.corner_radius != egui::CornerRadius::ZERO), "the popup flyout is rounded: {raised:?}"); + let docked = flyout_surfaces(true); + assert!(!docked.is_empty(), "the docked flyout paints its surface"); + for rect in &docked { + assert_eq!(rect.corner_radius, egui::CornerRadius::ZERO, "the docked flyout's surface is square: {rect:?}"); + assert!(rect.blur_width <= 0.0, "the docked flyout casts no shadow: {rect:?}"); + } +} + +/// The fills painted on the open panel's icon of a column beside tabs in `look`, with the colour of `surface.control`. +fn open_icon_fills(look: PanelTabLook) -> (Vec, egui::Color32) { + let mut fixture = Fixture::hosted(move |ui| { + let column = Column::new(vec![Group::new(vec![0, 1], 0)]); + let mut open = Some(0_u8); + let output = IconicColumn::new("Panels", global("iconic column", "open icon"), &column, Bind::bound(&mut open), &spec) + .tab_look(look) + .show_flyouts_at(ui, Rect::from_min_size(Pos2::ZERO, Vec2::new(RAIL, 300.0)), |_, _, _, _| None); + Some(output.into()) + }); + fixture.room(SCREEN).settle(); + let id = fixture.root_id().expect("the column shows"); + let cell = fixture.part_rect(id, CELL.at(0)).expect("the open panel's icon"); + let control = StyleCx::with_root(fixture.ctx(), |cx| cx.tokens.color.surface.control).0; + let fills = fixture + .frame_shapes() + .into_iter() + .filter_map(|shape| match shape { + egui::Shape::Rect(rect) if cell.expand(EPS).contains_rect(rect.rect) && rect.fill != egui::Color32::TRANSPARENT => Some(rect.fill), + _ => None, + }) + .collect(); + (fills, egui::Color32::from_rgba_unmultiplied(control[0], control[1], control[2], control[3])) +} + +/// Beside block tabs (`PanelTabLook::Block`, VectorCraft's) the open panel's icon shows on `surface.control`, as the +/// shown tab does; beside the other looks it keeps the accent's on look. +#[trial] +fn beside_block_tabs_the_open_icon_shows_on_the_control_surface() { + let (block, control) = open_icon_fills(PanelTabLook::Block); + assert!(block.contains(&control), "the open icon shows surface.control {control:?}: {block:?}"); + let (plain, _) = open_icon_fills(PanelTabLook::Plain); + assert!(!plain.is_empty() && !plain.contains(&control), "beside plain tabs the open icon keeps its own fill: {plain:?}"); } diff --git a/crates/ui-panels/src/docking/mod.rs b/crates/ui-panels/src/docking/mod.rs index 76af4b07fb..cf6341c92c 100644 --- a/crates/ui-panels/src/docking/mod.rs +++ b/crates/ui-panels/src/docking/mod.rs @@ -47,7 +47,7 @@ pub use root::{DockRoot, DockRootOutput, DockRootStyle}; pub use sources::{DividerKind, DockSource, SourceKind}; pub use spec::{DockGrid, DockHeights, PanelDocument, PanelSpec}; pub use splitter::{Splitter, SplitterStyle}; -pub use targets::{CardInset, DockSizes, DockSpot, DockTargets, GroupDrag, ZoneRule}; +pub use targets::{CardInset, ColumnCards, DockSizes, DockSpot, DockTargets, GroupDrag, ZoneRule}; pub use words::DockWords; pub use commands::{ diff --git a/crates/ui-panels/src/docking/placed.rs b/crates/ui-panels/src/docking/placed.rs index c6f4968725..5347e3ba95 100644 --- a/crates/ui-panels/src/docking/placed.rs +++ b/crates/ui-panels/src/docking/placed.rs @@ -50,12 +50,13 @@ impl<'a, P> Placing<'a, P> { } /// Runs `f` with the rules a dock area lays its docked tree out by: each panel's limits from `spec`, a dock as wide as -/// its columns' natural widths ([`DockSizes::natural`]), and no strip on a canvas alone in its group. +/// its columns' natural widths ([`DockSizes::natural`]) and [`DockSizes::dock_gap`] from the node beside it, and no +/// strip on a canvas alone in its group. pub fn with_area_rules(sizes: &DockSizes, spec: &dyn Fn(&P) -> PanelSpec, f: impl FnOnce(FrameRules<'_, P>) -> R) -> R { let limits = |panel: &P| spec(panel).limits; let dock_width = |columns: &[Column

]| sizes.natural(columns, spec).iter().map(|(width, _)| *width).sum::(); let stripless = |panel: &P| spec(panel).canvas; - f(FrameRules::new(&limits).dock_width(&dock_width).stripless(&stripless)) + f(FrameRules::new(&limits).dock_width(&dock_width).stripless(&stripless).dock_gap(sizes.dock_gap)) } /// The rect the panels `moved` take in `layout`, the layout after a drop, laid out in `room` (the room the dock diff --git a/crates/ui-panels/src/docking/stories.rs b/crates/ui-panels/src/docking/stories.rs index e07ee8e397..1515988b56 100644 --- a/crates/ui-panels/src/docking/stories.rs +++ b/crates/ui-panels/src/docking/stories.rs @@ -170,6 +170,22 @@ fn pill_tabs_and_the_panel_menu(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { .into() } +/// VectorCraft 0.24's group header (`DockConfig::tab_look(PanelTabLook::Block)`): the shown tab a square +/// `surface.control` block as tall as the strip, the strip on `surface.canvas`, and the panel menu button in the +/// strip's middle at its end. +#[story(DockGroup<'static, usize>, covers = [Default])] +fn block_tabs_and_the_panel_menu(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { + let panels = titles(&[LAYERS, CHANNELS]); + let rows = [DockCommands::FloatPanel, DockCommands::FloatGroup].map(|command| PanelRow::Command(CommandRef::from(command))).to_vec(); + DockGroup::new(LAYERS, Titles::from_content(panels.clone()), panels[0].key) + .menu(move || rows.clone()) + .panel_menu_icon(IconId::new("menu")) + .tab_look(PanelTabLook::Block) + .show(ui, |_, _| ()) + .output + .into() +} + #[story(GroupGrip, covers = [Default])] fn a_group_grip(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { GroupGrip::new(DragUnit::Group(LAYERS), PanelKey::of(&LAYERS)).label("Move tab group").show(ui).into() diff --git a/crates/ui-panels/src/docking/targets.rs b/crates/ui-panels/src/docking/targets.rs index 84e3b6d88e..a652d86ddd 100644 --- a/crates/ui-panels/src/docking/targets.rs +++ b/crates/ui-panels/src/docking/targets.rs @@ -44,6 +44,9 @@ pub struct DockSizes { /// The divider between two docked groups or between a dock and its neighbour (the tight gap: the references' /// dock dividers are 3 px at 100%). pub gap: f32, + /// The room between a dock and the node beside it: [`gap`](Self::gap), or none in a flush dock + /// ([`DockConfig::flush_docks`](super::DockConfig::flush_docks)). + pub dock_gap: f32, /// How far a band (edge, seam, column edge, new dock) reaches into a tab strip from its drop line (the least hit /// size): the rest of the strip joins the group. pub strip_reach: f32, @@ -51,7 +54,7 @@ pub struct DockSizes { pub least_pane: f32, /// The height of a group's tab strip or section title row (the panel header height), which every group height includes. pub strip: f32, - /// The height of a column bar (a small control). + /// The height of a column bar (`size.bar.column`). pub bar: f32, /// The height of a floating window's title row, which is the bar of the column the window holds. pub title_row: f32, @@ -92,16 +95,30 @@ pub struct DockSizes { /// The gutter between two neighbouring cards of a dock, on the outer side of each card past the window edge's: /// `space.gap.tight`. pub card_gutter: f32, - /// Whether the dock shows its docked columns as cards - /// ([`DockConfig::column_cards`](super::DockConfig::column_cards)): off in the style, set by the dock that shows + /// Which docked columns the dock shows as cards + /// ([`DockConfig::column_cards`](super::DockConfig::column_cards)): none in the style, set by the dock that shows /// them. - pub column_cards: bool, + pub column_cards: ColumnCards, /// The height of a grip strip, the band with the dock's grip marks: above each icon group of a collapsed column, /// and under the column bar of a tool rail (a group whose panel has a [`DockGrid`](super::DockGrid)) that the host /// shows itself: the least hit size, or the theme's grip marks with `space.gap.tight` above and below them. pub grip: f32, } +/// Which docked columns a dock shows as cards ([`DockConfig::column_cards`](super::DockConfig::column_cards)). +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] +#[non_exhaustive] +pub enum ColumnCards { + /// None: every column fills its cell. + #[default] + None, + /// Every docked column, expanded or collapsed to icons. + All, + /// Only the stepped columns, such as a docked tool rail ([`DockSizes::stepped`]); the panel columns stand flush: + /// VectorCraft 0.24's dock. + Stepped, +} + /// Which inset a docked column's card takes on its outer side ([`DockSizes::card_place`]). #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[non_exhaustive] @@ -143,10 +160,11 @@ impl DockSizes { cascade_inset: size.window.cascade, float_size: Vec2::new(size.float.width, size.float.height), gap: cx.tokens.space.gap.tight, + dock_gap: cx.tokens.space.gap.tight, strip_reach: size.hit.target, least_pane: size.pane.least, strip: size.panel_header, - bar: size.control.sm, + bar: size.bar.column, title_row: super::floating::title_row(cx.tokens), title_rule: cx.rule(RuleKind::Divider).width, pixels_per_point: cx.frame_ctx().pixels_per_point(), @@ -163,7 +181,7 @@ impl DockSizes { dense_rail_step, card: cx.tokens.space.gap.stack, card_gutter: cx.tokens.space.gap.tight, - column_cards: false, + column_cards: ColumnCards::None, grip: super::group::grip_strip(cx.tokens), } } @@ -211,23 +229,24 @@ impl DockSizes { column.width.unwrap_or(self.column).clamp(lo, hi) } - /// The inset on the outer side of the card of a dock's docked column `at` from the window edge inwards: none - /// without [`column_cards`](Self::column_cards); [`card`](Self::card) for the first column, at the window edge; - /// [`card_gutter`](Self::card_gutter) for the others, which stand that far from their outer neighbour's card. A - /// docked column is that much wider than its content. - pub fn card_inset(&self, at: usize) -> f32 { - self.card_place(at).map_or(0.0, |place| self.inset(place)) + /// The inset on the outer side of the card of `column`, a dock's docked column `at` from the window edge inwards: + /// none for a column [`column_cards`](Self::column_cards) shows as no card; [`card`](Self::card) for the first + /// column, at the window edge; [`card_gutter`](Self::card_gutter) for the others, which stand that far from their + /// outer neighbour. A docked column is that much wider than its content. + pub fn card_inset

(&self, at: usize, column: &Column

, spec: &dyn Fn(&P) -> PanelSpec) -> f32 { + self.card_place(at, column, spec).map_or(0.0, |place| self.inset(place)) } - /// Which inset the card of a dock's docked column `at` from the window edge inwards takes on its outer side: none - /// without [`column_cards`](Self::column_cards); [`CardInset::Edge`] for the first column, [`CardInset::Gutter`] - /// for the others. - pub fn card_place(&self, at: usize) -> Option { - match (self.column_cards, at) { - (false, _) => None, - (true, 0) => Some(CardInset::Edge), - (true, _) => Some(CardInset::Gutter), - } + /// Which inset the card of `column`, a dock's docked column `at` from the window edge inwards, takes on its outer + /// side: none for a column [`column_cards`](Self::column_cards) shows as no card; [`CardInset::Edge`] for the + /// first column, [`CardInset::Gutter`] for the others. + pub fn card_place

(&self, at: usize, column: &Column

, spec: &dyn Fn(&P) -> PanelSpec) -> Option { + let card = match self.column_cards { + ColumnCards::None => false, + ColumnCards::All => true, + ColumnCards::Stepped => !column.iconic && self.stepped(column, spec).is_some(), + }; + card.then_some(if at == 0 { CardInset::Edge } else { CardInset::Gutter }) } /// The inset on the outer side of a card at `place`: [`card`](Self::card) or [`card_gutter`](Self::card_gutter). @@ -293,7 +312,7 @@ impl DockSizes { .iter() .enumerate() .map(|(at, column)| { - let (width, inset) = (self.width(column, spec), self.card_inset(at)); + let (width, inset) = (self.width(column, spec), self.card_inset(at, column, spec)); let (lo, hi) = if fixed(column) { (width, width) } else { self.shown_bounds(column, spec) }; (width + inset, (lo + inset, hi + inset)) }) @@ -305,7 +324,7 @@ impl DockSizes { .zip(current.iter().zip(widths)) .filter(|((_, column), ((width, _), scaled))| !fixed(column) && (scaled - width).abs() >= 0.01) .filter_map(|((at, column), (_, width))| { - let width = width - self.card_inset(at); + let width = width - self.card_inset(at, column, spec); let panel = column.groups.iter().find_map(|group| group.panels.first())?.clone(); Some(if column.iconic { Action::resize_iconic(panel, Some(width)) } else { Action::resize_column(panel, width) }) }) @@ -321,7 +340,7 @@ impl DockSizes { .enumerate() .map(|(at, column)| { let keeps = column.iconic || self.stepped(column, spec).is_some(); - let inset = self.card_inset(at); + let inset = self.card_inset(at, column, spec); (self.width(column, spec) + inset, (!keeps).then(|| self.width_bounds(column, spec).0.max(1.0) + inset)) }) .collect() diff --git a/crates/ui-panels/src/docking/tree.rs b/crates/ui-panels/src/docking/tree.rs index 3fe0f8ca80..6221a75f84 100644 --- a/crates/ui-panels/src/docking/tree.rs +++ b/crates/ui-panels/src/docking/tree.rs @@ -28,6 +28,7 @@ pub struct FrameRules<'a, P> { limits: &'a dyn Fn(&P) -> SizeLimits, dock_width: Option<&'a DockWidthFn<'a, P>>, stripless: Option<&'a dyn Fn(&P) -> bool>, + dock_gap: Option, } impl

Clone for FrameRules<'_, P> { @@ -42,7 +43,14 @@ impl<'a, P> FrameRules<'a, P> { /// Rules with the panels' `limits`. A dock is as wide as its columns' stored widths (the dock column width for /// a column without one) until a `dock_width` says otherwise, and every panel has a strip. pub fn new(limits: &'a dyn Fn(&P) -> SizeLimits) -> Self { - FrameRules { limits, dock_width: None, stripless: None } + FrameRules { limits, dock_width: None, stripless: None, dock_gap: None } + } + + /// The room between a dock and the node beside it, in place of the dividers' gap (`DockSizes::dock_gap`). + #[must_use] + pub fn dock_gap(mut self, gap: f32) -> Self { + self.dock_gap = Some(gap); + self } /// The width of a dock's columns, as dock columns are drawn. @@ -336,7 +344,7 @@ impl

Sizer<'_, '_, P> { } Node::Split { axis, first, second, .. } => { let (a, b) = (self.bounds(first), self.bounds(second)); - let gap = sizes.gap; + let gap = if *axis == Axis::X && (is_dock(first) || is_dock(second)) { self.rules.dock_gap.unwrap_or(sizes.gap) } else { sizes.gap }; let (min, max) = match axis { Axis::X => (vec2(a.min.x + b.min.x + gap, a.min.y.max(b.min.y)), vec2(a.max.x + b.max.x + gap, a.max.y.min(b.max.y))), _ => (vec2(a.min.x.max(b.min.x), a.min.y + b.min.y + gap), vec2(a.max.x.min(b.max.x), a.max.y + b.max.y + gap)), @@ -357,7 +365,7 @@ impl

Sizer<'_, '_, P> { /// The rects of a dock and of the node beside it in `rect`. fn dock_cells(&self, edge: DockEdge, columns: &[Column

], other: &Node

, rect: Rect) -> (Rect, Rect) { - let gap = self.sizes.gap; + let gap = self.rules.dock_gap.unwrap_or(self.sizes.gap); let room = (rect.width() - gap - self.bounds(other).min.x).clamp(0.0, rect.width()); let width = self.rules.dock_width_of(columns, self.sizes.column).clamp(0.0, room); match edge { diff --git a/crates/ui-panels/tests/it/dialogs.rs b/crates/ui-panels/tests/it/dialogs.rs index 2d4b3c919d..453dc081e4 100644 --- a/crates/ui-panels/tests/it/dialogs.rs +++ b/crates/ui-panels/tests/it/dialogs.rs @@ -1157,3 +1157,36 @@ fn a_new_question_in_place_of_another_waits_again_for_its_armed_answer() { click_ok(&mut fixture); assert!(host.borrow().is_empty(), "after its delay the OK answers it"); } + +/// A dialog is padded `space.pad.dialog` and its footer buttons stand `size.dialog.button_height` high (VectorCraft's +/// 22-point margin and 28-point buttons); an app that sets neither keeps a panel's padding and a push button's height. +#[trial] +fn a_dialog_takes_its_padding_and_footer_button_height_from_the_dialog_sizes() { + let shown = |overrides: &[(&str, f32)]| { + let mut sizes = craft_theme::AppSizes::default(); + for (path, value) in overrides { + sizes.all.insert((*path).to_owned(), craft_theme::SizeValue::Number(*value)); + } + let mut root = craft_ui::runtime::env::RootEnv::default(); + root.sizes = Arc::new(sizes); + let mut fixture = Fixture::new(|ui| { + let mut open = true; + Dialog::new("Options").opened(Bind::bound(&mut open)).buttons([FooterButton::new("OK", DialogRole::Accept)]).show(ui, |ui, _| { + Text::new("Body text").show(ui); + }); + }); + fixture.root(root).room(vec2(1200.0, 800.0)).settle(); + let dialog = fixture.by_role(Role::DIALOG).first().expect("the dialog shows").rect; + let text = fixture.texts().iter().find(|run| run.text == "Body text").expect("the body is painted").rect; + (text.left() - dialog.left(), fixture.by_label("OK").expect("the footer's OK").rect.height()) + }; + let standard = shown(&[]); + let dialog = shown(&[("space.pad.dialog", 30.0), ("size.dialog.button_height", 40.0)]); + assert!(dialog.0 > standard.0 + 10.0, "a larger dialog padding moves the body in from the edge: {standard:?} then {dialog:?}"); + assert!(dialog.1 > standard.1 + 10.0, "a taller dialog button raises OK: {standard:?} then {dialog:?}"); + let follows = shown(&[("space.pad.regular", 30.0), ("size.button", 40.0)]); + assert!( + (follows.0 - dialog.0).abs() < 0.5 && (follows.1 - dialog.1).abs() < 0.5, + "both follow the panel padding and the push button: {follows:?} and {dialog:?}" + ); +} diff --git a/crates/ui-panels/tests/it/dock_group.rs b/crates/ui-panels/tests/it/dock_group.rs index 44240a12a4..b76f4b2753 100644 --- a/crates/ui-panels/tests/it/dock_group.rs +++ b/crates/ui-panels/tests/it/dock_group.rs @@ -65,10 +65,10 @@ fn the_shown_panels_caption_sits_under_the_tabs_and_its_count_names_its_tab() { assert!(fixture.by_label("2 replies").is_none(), "Comments' caption goes with it"); } -// Beside pill tabs (VectorCraft's) the panel menu button stands in the strip's middle, level with the shown tab's pill; -// beside plain tabs it keeps to the strip's top. +// Beside pill and block tabs (VectorCraft's) the panel menu button stands in the strip's middle, level with the shown +// tab's middle; beside plain tabs it keeps to the strip's top. #[trial] -fn the_panel_menu_button_stands_level_with_pill_tabs() { +fn the_panel_menu_button_stands_level_with_pill_and_block_tabs() { use craft_ui::menu::PanelRow; use craft_ui::tabs::PanelTabLook; let middles = |look: PanelTabLook| { @@ -82,10 +82,12 @@ fn the_panel_menu_button_stands_level_with_pill_tabs() { let Some(menu) = fixture.by_label("Panel Menu") else { panic!("the panel menu button shows") }; (tab.rect.center().y, menu.rect) }; - let (tab, menu) = middles(PanelTabLook::Pill); - assert!((menu.center().y - tab).abs() <= 0.5, "the menu button {menu:?} is level with the pill tab's middle {tab}"); let (_, plain) = middles(PanelTabLook::Plain); - assert!(menu.top() > plain.top() + 0.5, "beside plain tabs the button {plain:?} keeps to the strip's top, above {menu:?}"); + for look in [PanelTabLook::Pill, PanelTabLook::Block] { + let (tab, menu) = middles(look); + assert!((menu.center().y - tab).abs() <= 0.5, "beside {look:?} tabs the menu button {menu:?} is level with the tab's middle {tab}"); + assert!(menu.top() > plain.top() + 0.5, "beside plain tabs the button {plain:?} keeps to the strip's top, above {menu:?}"); + } } // A titled group shows the shown panel's name as a heading with its count and a close button, not a tab strip: the diff --git a/crates/ui-patterns/src/patterns/dock/area.rs b/crates/ui-patterns/src/patterns/dock/area.rs index ad4a690104..3734ecc754 100644 --- a/crates/ui-patterns/src/patterns/dock/area.rs +++ b/crates/ui-patterns/src/patterns/dock/area.rs @@ -315,9 +315,12 @@ impl Drops<'_, P> { } /// The sizes a dock area lays out with: the dock's style, with its docked columns as cards when `config` shows them -/// ([`DockConfig::column_cards`]). +/// ([`DockConfig::column_cards`]) and no gap beside a flush dock ([`DockConfig::flush_docks`]). fn area_sizes(mut sizes: DockSizes, config: &DockConfig) -> DockSizes { sizes.column_cards = config.column_cards; + if config.flush_docks { + sizes.dock_gap = 0.0; + } sizes } @@ -863,7 +866,7 @@ fn show_area( let limits = |panel: &P| scene.spec(panel).limits; let dock_width = |columns: &[Column

]| scene.natural(columns).iter().map(|(width, _)| *width).sum::(); let stripless = |panel: &P| scene.spec(panel).canvas; - let rules = FrameRules::new(&limits).dock_width(&dock_width).stripless(&stripless); + let rules = FrameRules::new(&limits).dock_width(&dock_width).stripless(&stripless).dock_gap(scene.sizes.dock_gap); let label = Label::from(body.words::().panels.as_str().to_owned()); let mut leaves: Vec<(Vec, Rect)> = Vec::new(); let area = SplitArea::new(label, Bind::given(layout.clone()), rules).show(ui, |ui, split| { @@ -1433,7 +1436,7 @@ impl Pass<'_, P> { // (photocraft#16461). Content taller than the dock scrolls inside. Only a floating stepped window is as // tall as its content. self.report.placed.push((first.clone(), cell)); - let card = scene.sizes.card_place(at); + let card = scene.sizes.card_place(at, column, &|panel: &P| scene.spec(panel)); let at = ColumnAt { cell, edge: plan.edge, bar: ColumnBar::Own, within: body.rect, open: plan.open.clone(), card }; self.column(ui, body, column, at); } @@ -1547,7 +1550,9 @@ impl Pass<'_, P> { .bar(bar) .within(within) .auto_collapse(scene.auto_collapse) - .mode(mode); + .mode(mode) + .tab_look(scene.config.tab_look) + .framed(scene.config.flush_docks && !in_window); let shown = match card { Some(place) => shown.card(place), None => shown, @@ -1606,7 +1611,8 @@ impl Pass<'_, P> { .bar(bar) .arrow(self.arrow_of(column)) .within(within) - .auto_collapse(scene.auto_collapse); + .auto_collapse(scene.auto_collapse) + .tab_look(scene.config.tab_look); let shown = match card { Some(place) => shown.card(place), None => shown, diff --git a/crates/ui-patterns/src/patterns/dock/area/stories.rs b/crates/ui-patterns/src/patterns/dock/area/stories.rs index 9513ad85ac..1a7d79c430 100644 --- a/crates/ui-patterns/src/patterns/dock/area/stories.rs +++ b/crates/ui-patterns/src/patterns/dock/area/stories.rs @@ -5,9 +5,10 @@ use crate::buttons::IconButton; use crate::contract::SizeLimits; use crate::contract::{BodyCx, Props as _, Show as _, Tracked}; use crate::display::Text; -use crate::docking::{DockConfig, DockGrid, DockPanels, GroupAt, IconicMode, PanelSpec, PanelSpecs}; +use crate::docking::{ColumnCards, DockConfig, DockGrid, DockPanels, GroupAt, IconicMode, PanelSpec, PanelSpecs}; use crate::menu::PanelRow; use crate::patterns::presets::{PresetPanelMenu, PresetView}; +use crate::tabs::PanelTabLook; use crate::testing::{Drive, StoryData, StoryOutput, story}; use craft_behavior::dock::{Column, DockEdge, Floating, Group, Layout, Node, Permissions, SplitSize, Workspace}; use craft_behavior::{Axis, IconId, Proposal}; @@ -169,3 +170,21 @@ fn rail_with_fixed_controls(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { let config = DockConfig::default().iconic_mode(IconicMode::Rail); DockArea::new("Rail dock", workspace_at.bind(&mut *workspace), &*SPECS, &mut demo, config).rail_footer(LAYERS).show(ui).into() } + +/// VectorCraft 0.24's dock frame: only the stepped tool column is a card (`ColumnCards::Stepped`); the docks stand flush +/// against the canvas, the column of icons framed as the panel column is (`DockConfig::flush_docks`); the panel tabs and +/// the column bars in the block look (`PanelTabLook::Block`). +#[story(DockArea<'static, usize>, covers = [Default], drive = Drive::Never)] +fn a_tool_card_beside_flush_panels(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + let (workspace, workspace_at) = data.value_at("stepped cards workspace", { + let tools = Column::new(vec![Group::new(vec![TOOLS], 0)]).with_steps(1); + let side = Column::new(vec![Group::new(vec![PROPERTIES, LAYERS], 0), Group::new(vec![HISTORY], 0)]); + let icons = Column::new(vec![Group::new(vec![SWATCHES], 0), Group::new(vec![NAVIGATOR], 0)]).with_iconic(true); + let docked = Node::split(Axis::X, SplitSize::Ratio(0.6), Node::tabs(vec![CANVAS], 0), Node::dock(DockEdge::End, vec![side, icons])); + let root = Node::split(Axis::X, SplitSize::FixedFirst(60.0), Node::dock(DockEdge::Start, vec![tools]), docked); + Arc::new(Workspace::new(Layout::new(Some(root), Vec::new()))) + }); + let mut demo = Demo { canvas_view: false, host_rows: false }; + let config = DockConfig::default().column_cards(ColumnCards::Stepped).flush_docks(true).tab_look(PanelTabLook::Block); + DockArea::new("Stepped cards dock", workspace_at.bind(&mut *workspace), &*SPECS, &mut demo, config).show(ui).into() +} diff --git a/crates/ui-patterns/tests/it/docking/columns.rs b/crates/ui-patterns/tests/it/docking/columns.rs index 217f91ad0c..f955893300 100644 --- a/crates/ui-patterns/tests/it/docking/columns.rs +++ b/crates/ui-patterns/tests/it/docking/columns.rs @@ -2,13 +2,14 @@ use craft_behavior::Axis; use craft_behavior::dock::{Action, Column, DockEdge, Floating, Group, Layout, Node, Permissions, SplitSize, Workspace, node_at}; +use craft_theme::{AppSizes, SizeValue}; use craft_ui::contract::{Bind, BodyCx, PlainData, Role, Show as _, SizeLimits, Tracked}; use craft_ui::display::Text; use craft_ui::docking::{ - DockConfig, DockGrid, DockHeights, DockPanels, DockSizes, GroupAt, GroupSize, IconicMode, PanelSpec, PanelSpecs, group_heights, + ColumnCards, DockConfig, DockGrid, DockHeights, DockPanels, DockSizes, GroupAt, GroupSize, IconicMode, PanelSpec, PanelSpecs, group_heights, }; use craft_ui::patterns::dock::DockArea; -use craft_ui::runtime::env::Direction; +use craft_ui::runtime::env::{Direction, RootEnv}; use craft_ui::testing::{Fixture, pointer, trial}; use egui::{Pos2, Rect, Ui, Vec2}; use std::cell::{Cell, RefCell}; @@ -510,7 +511,7 @@ impl DockPanels for RailStage { /// A start dock in `direction` of a toolbar column of two rail steps, at the window edge, and a side column beside it, /// with `DockConfig::column_cards` set to `cards`: the toolbar's cell, the side column's cell and the rail's stage. -fn rail_dock(cards: bool, direction: Direction) -> (Rect, Rect, Rect) { +fn rail_dock(cards: ColumnCards, direction: Direction) -> (Rect, Rect, Rect) { let columns = vec![Column::new(vec![Group::new(vec![TOOLS], 0)]).with_steps(2), Column::new(vec![Group::new(vec![2], 0)]).with_width(150.0)]; let root = Node::split(Axis::X, SplitSize::FixedFirst(300.0), Node::dock(DockEdge::Start, columns), Node::tabs(vec![1], 0)); let workspace = Rc::new(RefCell::new(Arc::new(Workspace::new(Layout::new(Some(root), Vec::new()))))); @@ -537,8 +538,8 @@ fn rail_dock(cards: bool, direction: Direction) -> (Rect, Rect, Rect) { fn a_rail_card_is_inset_alike_on_three_sides_and_keeps_its_steps() { for direction in [Direction::Ltr, Direction::Rtl] { let rtl = direction == Direction::Rtl; - let (plain_cell, _, plain) = rail_dock(false, direction); - let (cell, side, card) = rail_dock(true, direction); + let (plain_cell, _, plain) = rail_dock(ColumnCards::None, direction); + let (cell, side, card) = rail_dock(ColumnCards::All, direction); let (outer, inner) = if rtl { (cell.right() - card.right(), card.left() - cell.left()) } else { (card.left() - cell.left(), cell.right() - card.right()) }; let top = (card.top() - cell.top()) - (plain.top() - plain_cell.top()); @@ -593,7 +594,7 @@ struct CardDock { /// An end dock in `direction` beside the canvas: an expanded column at the window edge and, inward of it, a column /// collapsed to icons, with `DockConfig::column_cards` set to `cards`. -fn card_dock(cards: bool, direction: Direction) -> CardDock { +fn card_dock(cards: ColumnCards, direction: Direction) -> CardDock { let mut iconic = Column::new(vec![Group::new(vec![ICONS], 0)]); iconic.iconic = true; let columns = vec![Column::new(vec![Group::new(vec![SIDE], 0)]).with_width(220.0), iconic]; @@ -629,8 +630,8 @@ fn sides(cell: Rect, inner: Rect, rtl: bool) -> (f32, f32) { fn every_docked_column_is_a_card_with_gutters_between_them() { for direction in [Direction::Ltr, Direction::Rtl] { let rtl = direction == Direction::Rtl; - let plain = card_dock(false, direction); - let cards = card_dock(true, direction); + let plain = card_dock(ColumnCards::None, direction); + let cards = card_dock(ColumnCards::All, direction); // Each inset is measured against the same column without cards, so a panel's own padding cancels out. let inset = |cell: Rect, inner: Rect, plain_cell: Rect, plain_inner: Rect| { let ((outer, inward), (plain_outer, plain_inward)) = (sides(cell, inner, rtl), sides(plain_cell, plain_inner, rtl)); @@ -654,3 +655,114 @@ fn every_docked_column_is_a_card_with_gutters_between_them() { assert!((cards.icons.width() - plain.icons.width() - gutter).abs() <= 0.5, "{direction:?}: the icons' column grows by its gutter"); } } + +/// The top of the expanded column's panel body in the card dock, with the column bar `size.bar.column` set to `bar` +/// points when given. +fn body_top(bar: Option) -> f32 { + let mut iconic = Column::new(vec![Group::new(vec![ICONS], 0)]); + iconic.iconic = true; + let columns = vec![Column::new(vec![Group::new(vec![SIDE], 0)]).with_width(220.0), iconic]; + let root = Node::split(Axis::X, SplitSize::Ratio(0.6), Node::tabs(vec![1], 0), Node::dock(DockEdge::End, columns)); + let workspace = Rc::new(RefCell::new(Arc::new(Workspace::new(Layout::new(Some(root), Vec::new()))))); + let body: Rc>> = Rc::default(); + let (held, shown, specs) = (Rc::clone(&workspace), Rc::clone(&body), Tracked::new(CardPanels)); + let mut fixture = Fixture::new(move |ui| { + let mut workspace = held.borrow().clone(); + let _ = DockArea::new("Bar dock", Bind::bound(&mut workspace), &specs, &mut CardStage(Rc::clone(&shown)), DockConfig::default()).show(ui); + *held.borrow_mut() = workspace; + }); + let mut root = RootEnv::default(); + if let Some(bar) = bar { + let mut sizes = AppSizes::default(); + sizes.all.insert("size.bar.column".to_owned(), SizeValue::Number(bar)); + root.sizes = Arc::new(sizes); + } + fixture.root(root).room(Vec2::new(900.0, 500.0)).settle(); + body.get().expect("the side panel shows").top() +} + +/// A dock column's bar is `size.bar.column` high: an app that sets it lower (VectorCraft's 14 points) raises the +/// column's groups by the difference from the built-in small control height. +#[trial] +fn a_columns_bar_is_as_high_as_its_token() { + let built_in = body_top(None); + let low = body_top(Some(14.0)); + assert!(low < built_in - 0.5, "a lower column bar raises the column's groups: {low} against {built_in}"); +} + +/// `ColumnCards::Stepped` (VectorCraft's dock) shows the tool rail as the card `ColumnCards::All` shows, and the panel +/// column beside it flush, as wide as with no cards; neither overlaps the other. Right to left mirrors it. +#[trial] +fn only_the_tool_rail_is_a_card_with_stepped_cards() { + for direction in [Direction::Ltr, Direction::Rtl] { + let (_, plain_side, _) = rail_dock(ColumnCards::None, direction); + let (all_cell, _, all_stage) = rail_dock(ColumnCards::All, direction); + let (cell, side, stage) = rail_dock(ColumnCards::Stepped, direction); + assert!( + (stage.min - all_stage.min).length() <= 0.5 && (stage.size() - all_stage.size()).length() <= 0.5, + "{direction:?}: the rail's card {stage:?} is the one all cards give, {all_stage:?}" + ); + assert!((cell.width() - all_cell.width()).abs() <= 0.5, "{direction:?}: the toolbar {cell:?} is as wide as with all cards, {all_cell:?}"); + assert!( + (side.width() - plain_side.width()).abs() <= 0.5, + "{direction:?}: the panel column {side:?} is no card: as wide as {plain_side:?} without cards" + ); + let clear = if direction == Direction::Rtl { side.right() <= cell.left() + 0.5 } else { side.left() >= cell.right() - 0.5 }; + assert!(clear, "{direction:?}: the panel column {side:?} overlaps the toolbar {cell:?}"); + } +} + +/// Panels that record the rect of the canvas's group (panel 1), which they draw themselves. +struct CanvasStage(Rc>>); + +impl DockPanels for CanvasStage { + fn body(&mut self, _: &u32, _: &mut Ui, _: &mut BodyCx<'_>) {} + + fn group_view(&mut self, panels: &[u32], _: usize, _: &mut Ui, at: GroupAt, _: &mut BodyCx<'_>) -> Option { + if !panels.contains(&1) { + return None; + } + Some(match at { + GroupAt::Measure(_) => 0.0, + GroupAt::Show(rect) => { + self.0.set(Some(rect)); + rect.height() + } + }) + } +} + +/// The room between the canvas and the end dock of the card dock's columns, with `DockConfig::flush_docks` set to +/// `flush`. +fn canvas_to_dock(flush: bool, direction: Direction) -> f32 { + let mut iconic = Column::new(vec![Group::new(vec![ICONS], 0)]); + iconic.iconic = true; + let columns = vec![Column::new(vec![Group::new(vec![SIDE], 0)]).with_width(220.0), iconic]; + let root = Node::split(Axis::X, SplitSize::Ratio(0.6), Node::tabs(vec![1], 0), Node::dock(DockEdge::End, columns)); + let workspace = Rc::new(RefCell::new(Arc::new(Workspace::new(Layout::new(Some(root), Vec::new()))))); + let placed: Rc>> = Rc::default(); + let canvas: Rc>> = Rc::default(); + let (held, seen, shown, specs) = (Rc::clone(&workspace), Rc::clone(&placed), Rc::clone(&canvas), Tracked::new(CardPanels)); + let mut fixture = Fixture::new(move |ui| { + let mut workspace = held.borrow().clone(); + let config = DockConfig::default().flush_docks(flush); + let out = DockArea::new("Flush dock", Bind::bound(&mut workspace), &specs, &mut CanvasStage(Rc::clone(&shown)), config).show(ui); + *held.borrow_mut() = workspace; + *seen.borrow_mut() = out.columns; + }); + fixture.direction(direction).room(Vec2::new(900.0, 500.0)).settle(); + let icons = placed.borrow().iter().find(|(at, _)| *at == ICONS).map(|(_, rect)| *rect).expect("the icons' column shows"); + let canvas = canvas.get().expect("the canvas shows"); + if direction == Direction::Rtl { canvas.left() - icons.right() } else { icons.left() - canvas.right() } +} + +/// A flush dock (`DockConfig::flush_docks`, VectorCraft's) meets the canvas with no gap and without overlapping it; by +/// default a gap parts them. Right to left mirrors it. +#[trial] +fn a_flush_dock_meets_the_canvas() { + for direction in [Direction::Ltr, Direction::Rtl] { + let (gap, flush) = (canvas_to_dock(false, direction), canvas_to_dock(true, direction)); + assert!(gap > 0.5, "{direction:?}: a gap {gap} parts the canvas from the dock by default"); + assert!(flush.abs() <= 0.5, "{direction:?}: the flush dock stands {flush} from the canvas"); + } +} diff --git a/crates/ui-shell/src/shell/start.rs b/crates/ui-shell/src/shell/start.rs index 0a2945e1d0..4f0e53ff27 100644 --- a/crates/ui-shell/src/shell/start.rs +++ b/crates/ui-shell/src/shell/start.rs @@ -859,7 +859,7 @@ impl StartScreen<'_> { let width = room.width().min(column); let at = Rect::from_min_size(pos2(room.center().x - width / 2.0, room.top() + margin), vec2(width, room.height())); ui.scope_builder(UiBuilder::new().max_rect(at), |ui| { - let _ = Stack::new().id_salt("start-column").gap(Gap::Section).fill_width().show(ui, |ui, _| { + let _ = Stack::new().id_salt("start-column").gap(Gap::PageSection).fill_width().show(ui, |ui, _| { column_heading(&page, ui, title.as_ref(), subtitle.as_ref()); host_sections(ui, StartPlace::BeforeRecent); // The recent files as rows in the app's order, only when there are any. @@ -878,7 +878,7 @@ impl StartScreen<'_> { column_links(&page, ui, links_title.as_ref(), links); }); }); - ui.allocate_space(vec2(0.0, margin)); + ui.add_space(env.tokens.size.page.margin); }); return StartOutput { response: shown.output, actions: actions.into_inner() }; } @@ -1172,9 +1172,9 @@ fn page_section(title: Label) -> Section<'static> { Section::fixed(title).header_gap(Gap::Section) } -/// A section of a Column page: its title a heading with no rule, its body a stack gap under it. +/// A section of a Column page: its title a heading with no rule, its body the page's heading gap under it. fn column_section(title: Label) -> Section<'static> { - Section::fixed(title).quiet_header().header_gap(Gap::Stack) + Section::fixed(title).quiet_header().header_gap(Gap::PageHeading) } /// `body` centred across the column. @@ -1182,71 +1182,100 @@ fn centred(ui: &mut Ui, body: impl FnMut(&mut Ui, &mut BodyCx<'_>)) { let _ = Row::new().align(RowAlign::Center).fill_width().show(ui, body); } -/// The top of a Column page: the title over the subtitle, then New and Open, each centred. +/// The top of a Column page: the title over the subtitle, then New and Open as page actions, each centred. fn column_heading(page: &Page<'_>, ui: &mut Ui, title: Option<&Label>, subtitle: Option<&Label>) { - if title.is_some() || subtitle.is_some() { - let _ = Stack::new().gap(Gap::Tight).fill_width().show(ui, |ui, _| { - if let Some(title) = title { - centred(ui, |ui, _| drop(Text::new(title.clone()).role(TypeRole::Display).show(ui))); - } - if let Some(subtitle) = subtitle { - centred(ui, |ui, _| drop(Text::new(subtitle.clone()).shade(Shade::Muted).show(ui))); - } - }); - } - if page.offers_new || page.offers_open { - let _ = Row::new().align(RowAlign::Center).gap(Gap::Stack).fill_width().show(ui, |ui, _| new_and_open(page, ui, Sizing::Content)); + let (heading, actions) = (title.is_some() || subtitle.is_some(), page.offers_new || page.offers_open); + if !heading && !actions { + return; } + let _ = Stack::new().id_salt("start-heading").gap(Gap::PageLead).fill_width().show(ui, |ui, _| { + if heading { + let _ = Stack::new().gap(Gap::PageTitle).fill_width().show(ui, |ui, _| { + if let Some(title) = title { + centred(ui, |ui, _| drop(Text::new(title.clone()).role(TypeRole::Display).show(ui))); + } + if let Some(subtitle) = subtitle { + centred(ui, |ui, _| drop(Text::new(subtitle.clone()).shade(Shade::Muted).show(ui))); + } + }); + } + if actions { + let place = |overrides: &mut Overrides| { + overrides.values.set(ControlPlace::PageAction); + }; + let _ = with_env(ui, place, |ui| { + Row::new().align(RowAlign::Center).gap(Gap::PageActions).fill_width().show(ui, |ui, _| new_and_open(page, ui, Sizing::Content)) + }); + } + }); } /// The links of a Column page under their heading, each centred: the call to action ([`StartLink::primary`]) as a -/// pill with its icon, the others as links without their icons. A URL opens in the browser (the URL is its tooltip); -/// a command fires as a pointer activation. +/// pill with its icon, the others as links without their icons, each run of them in rows `size.page.link` high a +/// page link gap apart. A URL opens in the browser (the URL is its tooltip); a command fires as a pointer activation. fn column_links(page: &Page<'_>, ui: &mut Ui, title: Option<&Label>, links: &[StartLink]) { if links.is_empty() { return; } - let _ = Stack::new().id_salt("start-links").gap(Gap::Stack).label(page.words.start_links.clone()).fill_width().show(ui, |ui, cx| { + let stack = Stack::new().id_salt("start-links").gap(Gap::PageHeading).label(page.words.start_links.clone()).fill_width(); + let _ = stack.show(ui, |ui, cx| { if let Some(title) = title { centred(ui, |ui, _| drop(Text::new(title.clone()).role(TypeRole::BodyStrong).show(ui))); } - for (at, link) in links.iter().enumerate() { - let url = match &link.target { - StartLinkTarget::Url(url) => Some(url), - StartLinkTarget::Command(_) => None, - }; - let mut activated = false; - centred(ui, |ui, _| { - activated = if link.primary { - let mut button = Button::new(link.label.clone()).id_salt(("start-link", at)).variant(Variant::Custom(CALL_TO_ACTION_LOOK)); - if let Some(icon) = &link.icon { - button = button.icon(icon.clone()); + let mut at = 0; + for run in links.chunk_by(|a, b| !a.primary && !b.primary) { + if run[0].primary { + column_link(ui, cx, at, &run[0]); + } else { + let _ = Stack::new().gap(Gap::PageLink).fill_width().show(ui, |ui, cx| { + for (offset, link) in run.iter().enumerate() { + column_link(ui, cx, at + offset, link); } - if let Some(url) = url { - button = button.tooltip(url.clone()); - } - let place = |overrides: &mut Overrides| { - overrides.values.set(ControlPlace::CallToAction); - }; - clicked(&with_env(ui, place, |ui| button.show(ui))) - } else { - let mut text = Link::new(link.label.clone()).id_salt(("start-link", at)); - if let Some(url) = url { - text = text.url(url.clone()).tooltip(url.clone()); - } - clicked(&text.show(ui)) - }; - }); - // A link opens its own URL; the pill is a button, so the page opens its URL. - match (&link.target, activated) { - (StartLinkTarget::Url(url), true) if link.primary => cx.open_url(url, false), - (StartLinkTarget::Command(command), true) => drop(commands::fire(ui.ctx(), command.clone(), FireSource::Pointer)), - _ => {} + }); } + at += run.len(); } }); } +/// Link `at` of a Column page, centred: the call to action as a pill, another as a link. +fn column_link(ui: &mut Ui, cx: &mut BodyCx<'_>, at: usize, link: &StartLink) { + let url = match &link.target { + StartLinkTarget::Url(url) => Some(url), + StartLinkTarget::Command(_) => None, + }; + let mut activated = false; + let row = Row::new().align(RowAlign::Center).fill_width(); + let row = if link.primary { row } else { row.least_height(Env::of(ui).tokens.size.page.link) }; + let _ = row.show(ui, |ui, _| { + activated = if link.primary { + let mut button = Button::new(link.label.clone()).id_salt(("start-link", at)).variant(Variant::Custom(CALL_TO_ACTION_LOOK)); + if let Some(icon) = &link.icon { + button = button.icon(icon.clone()); + } + if let Some(url) = url { + button = button.tooltip(url.clone()); + } + let place = |overrides: &mut Overrides| { + overrides.values.set(ControlPlace::CallToAction); + }; + clicked(&with_env(ui, place, |ui| button.show(ui))) + } else { + let mut text = Link::new(link.label.clone()).id_salt(("start-link", at)); + if let Some(url) = url { + text = text.url(url.clone()).tooltip(url.clone()); + } + clicked(&text.show(ui)) + }; + }); + // A link opens its own URL; the pill is a button, so the page opens its URL. + match (&link.target, activated) { + (StartLinkTarget::Url(url), true) if link.primary => cx.open_url(url, false), + (StartLinkTarget::Command(command), true) => drop(commands::fire(ui.ctx(), command.clone(), FireSource::Pointer)), + _ => {} + } +} + /// New and Open, the first Tab stops of the page; Open alone where the app offers no New. fn new_and_open(page: &Page<'_>, ui: &mut Ui, sizing: Sizing) { if page.offers_new && clicked(&Button::new(page.new_label()).id_salt("new").variant(Variant::PRIMARY).sizing(sizing).show(ui)) { diff --git a/crates/ui-shell/src/shell/start/stories.rs b/crates/ui-shell/src/shell/start/stories.rs index 7c7eea8b3a..7d50362017 100644 --- a/crates/ui-shell/src/shell/start/stories.rs +++ b/crates/ui-shell/src/shell/start/stories.rs @@ -211,9 +211,9 @@ fn page_templates() -> Vec