Space fix

This commit is contained in:
Jonathan Johnson 2024-01-06 10:25:45 -08:00
parent 1b608b39af
commit bb28f96b58
No known key found for this signature in database
GPG key ID: A66D6A34D6620579
4 changed files with 8 additions and 4 deletions

View file

@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
<!-- markdownlint-disable no-duplicate-heading -->
## Unreleased
### Breaking Changes
@ -66,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Progress` now utilizes `IntoSource<Progress>` instead of
`IntoDynamic<Progress>`. In general, this should not cause any code breakages
unless the traits were being used in generics.
- `Space` now honors `ConstraintLimit::Fill` in its layout.
### Changed

View file

@ -42,6 +42,8 @@ pub use custom::Custom;
pub use data::Data;
pub use disclose::Disclose;
pub use expand::Expand;
pub use grid::Grid;
pub use image::Image;
pub use input::Input;
pub use label::Label;
pub use layers::Layers;
@ -60,5 +62,3 @@ pub use themed::Themed;
pub use tilemap::TileMap;
pub use validated::Validated;
pub use wrap::Wrap;
pub use self::image::Image;

View file

@ -71,10 +71,10 @@ impl Widget for Space {
fn layout(
&mut self,
_available_space: Size<ConstraintLimit>,
available_space: Size<ConstraintLimit>,
_context: &mut LayoutContext<'_, '_, '_, '_>,
) -> Size<UPx> {
Size::default()
available_space.map(ConstraintLimit::min)
}
}

View file

@ -3177,6 +3177,7 @@ where
/// # Panics
///
/// This function panics if the color is not the expected color.
#[track_caller]
pub fn assert_pixel_color<Unit>(&self, location: Point<Unit>, expected: Color, component: &str)
where
Unit: Into<UPx>,