pub struct PaneScaffoldDirective {
pub max_horizontal_partitions: usize,
pub horizontal_partition_spacer_size: f64,
pub max_vertical_partitions: usize,
pub vertical_partition_spacer_size: f64,
pub default_pane_preferred_width: f64,
pub default_pane_preferred_height: f64,
}Expand description
How many panes the window has room for, and how they are spaced.
The values are Compose’s PaneScaffoldDirective without the posture-derived bounds: a hinge
waits for the embedders to report one.
Fields§
§max_horizontal_partitions: usizeThe maximum number of panes side by side.
horizontal_partition_spacer_size: f64The spacer between two panes side by side, in logical pixels.
max_vertical_partitions: usizeThe maximum number of panes stacked.
vertical_partition_spacer_size: f64The spacer between two stacked panes, in logical pixels.
default_pane_preferred_width: f64The width a pane asks for when it names none.
default_pane_preferred_height: f64The height a reflowed pane asks for when it names none.
Implementations§
Source§impl PaneScaffoldDirective
impl PaneScaffoldDirective
Sourcepub const DEFAULT_PANE_PREFERRED_WIDTH: f64 = 360.0
pub const DEFAULT_PANE_PREFERRED_WIDTH: f64 = 360.0
Compose’s default preferred pane width, in logical pixels.
Sourcepub const DEFAULT_PANE_PREFERRED_WIDTH_XL: f64 = 412.0
pub const DEFAULT_PANE_PREFERRED_WIDTH_XL: f64 = 412.0
Compose’s default preferred pane width on a large window, in logical pixels.
Sourcepub const DEFAULT_PANE_PREFERRED_HEIGHT: f64 = 420.0
pub const DEFAULT_PANE_PREFERRED_HEIGHT: f64 = 420.0
Compose’s default preferred pane height, in logical pixels.
Sourcepub fn from_window_size_class(
size_class: WindowSizeClass,
) -> PaneScaffoldDirective
pub fn from_window_size_class( size_class: WindowSizeClass, ) -> PaneScaffoldDirective
One partition below Expanded, two at Expanded and three from Large; 24-pixel spacers.
Sourcepub fn with_two_panes_on_medium_width(
size_class: WindowSizeClass,
) -> PaneScaffoldDirective
pub fn with_two_panes_on_medium_width( size_class: WindowSizeClass, ) -> PaneScaffoldDirective
The same, with two panes already at Medium width.