Files
craft-libs/crates/ui-shell/Cargo.toml
T
aiongg c19abe8663 Dock a native window by dragging its title row
A floating dock group in its own OS window now moves through a window move
gesture the app runs, which reports Begin, Update, Commit and Cancel like a
layer's move, so the dock marks the target under the pointer and docks the
whole window on release.

- macOS (Caps::OS_MOVES_TRACKED): the OS moves the window (StartMove), and the
  app follows the system pointer, button and Cmd through SystemWindows, the
  running platform's WindowSystem in craft-window. The hand-off ends when the
  system reports the button up.
- X11 and Windows: the app moves the window with SetOuterPosition so the
  pressed point stays under the pointer; Escape puts it back.
- A drag started by a container shown in its own OS window follows that
  window's pointer, not its parent's.
- The runtime's end hook sets NSWindow.movable for every window; a window
  whose move the app runs is never moved by AppKit from its band.
2026-11-12 14:32:39 +00:00

56 lines
1.7 KiB
TOML

[package]
name = "craft-ui-shell"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "The app shell and title bar of the craft UI library, and its eframe entry point"
[lib]
# Every test lives in the `it` integration binary.
test = false
[lints]
workspace = true
[features]
default = []
# `shell::app`: the eframe entry point.
app = ["dep:eframe", "craft-window/ui"]
# `craft_ui::testing`.
testing = ["craft-ui-panels/testing"]
[dependencies]
craft-ui-panels = { workspace = true }
craft-behavior = { workspace = true }
craft-theme = { workspace = true }
craft-ui-macros = { workspace = true }
egui = { workspace = true }
eframe = { version = "0.37", default-features = false, features = ["wgpu", "x11", "default_fonts"], optional = true }
craft-host = { workspace = true }
craft-window = { workspace = true }
craft-i18n = { workspace = true, features = ["collate"] }
# The caption button icons.
resvg = { version = "0.45.1", default-features = false }
# `std::time::Instant` on native; the browser clock on wasm, where `Instant::now` panics.
web-time = "1.1"
# `AppSpec::new` installs `craft_window::system::SystemWindows`, which reads AppKit without craft-window's egui layer.
[target.'cfg(target_os = "macos")'.dependencies]
craft-window = { workspace = true, features = ["appkit"] }
[dev-dependencies]
craft-ui-shell = { path = ".", features = ["testing"] }
craft-behavior = { workspace = true }
craft-host = { workspace = true }
craft-theme = { workspace = true }
craft-ui-test-kit = { workspace = true }
craft-window = { workspace = true }
egui = { workspace = true }
[[test]]
name = "it"
path = "tests/it/main.rs"
harness = false