Make Layout properties public (#2096)
This commit is contained in:
parent
9901ad4bb0
commit
aa1536f1a7
1 changed files with 6 additions and 6 deletions
|
@ -118,28 +118,28 @@ impl Direction {
|
||||||
// #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
// #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||||
pub struct Layout {
|
pub struct Layout {
|
||||||
/// Main axis direction
|
/// Main axis direction
|
||||||
main_dir: Direction,
|
pub main_dir: Direction,
|
||||||
|
|
||||||
/// If true, wrap around when reading the end of the main direction.
|
/// If true, wrap around when reading the end of the main direction.
|
||||||
/// For instance, for `main_dir == Direction::LeftToRight` this will
|
/// For instance, for `main_dir == Direction::LeftToRight` this will
|
||||||
/// wrap to a new row when we reach the right side of the `max_rect`.
|
/// wrap to a new row when we reach the right side of the `max_rect`.
|
||||||
main_wrap: bool,
|
pub main_wrap: bool,
|
||||||
|
|
||||||
/// How to align things on the main axis.
|
/// How to align things on the main axis.
|
||||||
main_align: Align,
|
pub main_align: Align,
|
||||||
|
|
||||||
/// Justify the main axis?
|
/// Justify the main axis?
|
||||||
main_justify: bool,
|
pub main_justify: bool,
|
||||||
|
|
||||||
/// How to align things on the cross axis.
|
/// How to align things on the cross axis.
|
||||||
/// For vertical layouts: put things to left, center or right?
|
/// For vertical layouts: put things to left, center or right?
|
||||||
/// For horizontal layouts: put things to top, center or bottom?
|
/// For horizontal layouts: put things to top, center or bottom?
|
||||||
cross_align: Align,
|
pub cross_align: Align,
|
||||||
|
|
||||||
/// Justify the cross axis?
|
/// Justify the cross axis?
|
||||||
/// For vertical layouts justify mean all widgets get maximum width.
|
/// For vertical layouts justify mean all widgets get maximum width.
|
||||||
/// For horizontal layouts justify mean all widgets get maximum height.
|
/// For horizontal layouts justify mean all widgets get maximum height.
|
||||||
cross_justify: bool,
|
pub cross_justify: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Layout {
|
impl Default for Layout {
|
||||||
|
|
Loading…
Reference in a new issue