layer-shika/crates/domain/src/value_objects/popup_size.rs

26 lines
592 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#[derive(Debug, Clone, Default)]
pub enum PopupSize {
/// Fixed logical size
Fixed { width: f32, height: f32 },
/// Minimum size (can grow with content)
Minimum { width: f32, height: f32 },
/// Maximum size (can shrink below content)
Maximum { width: f32, height: f32 },
/// Constrained range
Range {
min_width: f32,
min_height: f32,
max_width: f32,
max_height: f32,
},
/// Automatic based on content (default: use 2×2 initialization)
#[default]
Content,
/// Match parent popup size
MatchParent,
}