Files
craft-libs/crates/ui-patterns/tests/it/docking/mod.rs
T
Martin Ball b912c077f0 chrome-w4: net change of 4 commits
- chrome-w4: written by an agent
- chrome-w4: finished by an agent
- chrome-w4: finished by an agent
- chrome-w4: review fixes (review-1)
2026-11-18 16:01:11 +00:00

40 lines
948 B
Rust

//! Docking (20.6): panels and groups dragged through the drag session land on the group and side the pointer is over.
use craft_theme::{Contrast, ControlSize, Mode, Variant};
use craft_ui::docking::DockSizes;
use craft_ui::testing::style::{tokens, with_cx};
mod render;
mod panel_menu;
mod runs;
mod split;
mod drop;
mod drop_preview;
mod drop_session;
mod floating;
mod floating_area;
mod hidden;
mod columns;
mod dock_back;
mod group_view;
mod workspace_dialogs;
mod native;
mod panes;
/// The docking sizes of the default theme with the given divider gap, least pane and strip height.
fn sizes(gap: f32, least_pane: f32, strip: f32) -> DockSizes {
with_cx(&egui::Context::default(), &tokens(Mode::Light, Contrast::Standard), Variant::SECONDARY, ControlSize::Md, |cx| {
let mut sizes = DockSizes::style(cx);
sizes.gap = gap;
sizes.least_pane = least_pane;
sizes.strip = strip;
sizes
})
}