Skip to main content

Module layout

Module layout 

Source
Expand description

Rows and columns for a Dialog, so that its controls need no hand-placed coordinates.

use glasskit::dialog::Bounds;
use glasskit::layout::{Column, Size};

let mut column = Column::new(Bounds::new(0, 0, 400, 300), 8);
let [label, field] = column
    .next(26)
    .columns([Size::Fixed(120), Size::Fill(1)], 8);
assert_eq!(label, Bounds::new(0, 0, 120, 26));
assert_eq!(field, Bounds::new(128, 0, 272, 26));
assert_eq!(column.next(26).y, 34);

Structs§

Column
Rows from the top of an area down, with a gap between them.

Enums§

Size
The width of one column in Bounds::columns.