Merge pull request #2265 from rizzen-yazston/master

Fixed horizontal_space() and vertical_space() helper functions.
This commit is contained in:
Héctor Ramón 2024-02-19 09:53:45 +01:00 committed by GitHub
commit 49b3a714cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View file

@ -10,10 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Black images when using OpenGL backend in `iced_wgpu`. [#2259](https://github.com/iced-rs/iced/pull/2259)
- Documentation for `horizontal_space` and `vertical_space` helpers. [#2265](https://github.com/iced-rs/iced/pull/2265)
Many thanks to...
- @PolyMeilex
- @rizzen-yazston
## [0.12.0] - 2024-02-15
### Added

View file

@ -302,16 +302,18 @@ where
ComboBox::new(state, placeholder, selection, on_selected)
}
/// Creates a new horizontal [`Space`] with the given [`Length`].
/// Creates a new [`Space`] widget that fills the available
/// horizontal space.
///
/// [`Space`]: crate::Space
/// This can be useful to separate widgets in a [`Row`].
pub fn horizontal_space() -> Space {
Space::with_width(Length::Fill)
}
/// Creates a new vertical [`Space`] with the given [`Length`].
/// Creates a new [`Space`] widget that fills the available
/// vertical space.
///
/// [`Space`]: crate::Space
/// This can be useful to separate widgets in a [`Column`].
pub fn vertical_space() -> Space {
Space::with_height(Length::Fill)
}