Skip to main content

Module resize

Module resize 

Source
Expand description

Resize — a nested, user-draggable resizable container.

Egui-parity port of egui::Resize. Wraps a single child widget and exposes a bottom-right grip the user can drag to resize the subregion independently of its surrounding layout. Used inside the Window Resize Test’s “↔ auto-sized” window to show a resize- within-auto-size behaviour (the outer window fits its content; the inner Resize has its own draggable handle).

§Coordinate conventions

The widget is pure Y-up: local (0, 0) is bottom-left. The SE grip sits at (w - HANDLE, 0) .. (w, HANDLE) — bottom-right in screen space.

§Drag bookkeeping

A drag captures the mouse position in parent-relative coords (local + bounds.xy) rather than widget-local. That keeps the drag stable even when the parent’s layout shifts the widget’s bounds.y because the widget’s own height just changed — a common situation inside a FlexColumn, where stacking widgets push later siblings down when earlier ones grow.

Structs§

Resize