pub struct Positioner {
pub size: Option<(u32, u32)>,
pub size_limits: Limits,
pub anchor_rect: Rectangle<i32>,
pub anchor: Anchor,
pub gravity: Gravity,
pub constraint_adjustment: u32,
pub offset: (i32, i32),
pub reactive: bool,
pub window_geometry: Option<(i32, i32, i32, i32)>,
pub shadow_padding: u32,
}Expand description
Positioner configuration for popup placement.
Fields§
§size: Option<(u32, u32)>Size of the popup (if None, will be auto-sized)
size_limits: LimitsSize limits for auto-sizing
anchor_rect: Rectangle<i32>Rectangle on the parent surface to anchor to
anchor: AnchorWhere on the anchor_rect to attach
gravity: GravityDirection the popup extends from the anchor point
constraint_adjustment: u32How to adjust if popup would be constrained
offset: (i32, i32)Offset from the calculated position
reactive: boolWhether popup should reposition when parent moves
window_geometry: Option<(i32, i32, i32, i32)>Window geometry (x, y, width, height) in logical pixels.
Tells the compositor which part of the surface is visible content (excluding shadows/decorations). The compositor uses this for constraint adjustment (SLIDE/FLIP) — only the geometry rect is kept on-screen, not the full surface.
shadow_padding: u32Shadow padding in logical pixels.
When set and size is None (auto-sizing), iced will automatically
compute window_geometry from the measured content size minus this
padding on each side. This tells the compositor to only constrain
the visible content area, not the shadow.