diff --git a/CHANGELOG.md b/CHANGELOG.md index 026dd0f..1504df3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -126,6 +126,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 contents. This means that the scroll bars are now clickable even in areas where interactive widgets are beneath them. - `GraphicsContext::fill` now properly fills the entire region of the widget. +- `Slider` now correctly calculates its width when in a fully `SizeToFit` + layout. ### Added diff --git a/src/widgets/slider.rs b/src/widgets/slider.rs index adfd1b3..3ed6d18 100644 --- a/src/widgets/slider.rs +++ b/src/widgets/slider.rs @@ -548,7 +548,7 @@ where // user of the slider, a horizontal slider is expected. So, we // set the minimum measurement based on a horizontal // orientation. - Size::new(width.min(minimum_size), static_side) + Size::new(width.max(minimum_size), static_side) } } }