pub trait SizedWidgetRef: WidgetRef + Debug {
// Required methods
fn width(&self) -> usize;
fn height(&self) -> usize;
}
Expand description
A trait for widgets that have a fixed size.
This trait allows the popup to automatically size itself based on the size of the body widget. Implementing this trait for a widget allows it to be used as the body of a popup. You can also wrap existing widgets in a newtype and implement this trait for the newtype to use them as the body of a popup.