Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed horizontal_space() and vertical_space() helper functions. #2265

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions widget/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Loading