Skip to content

Commit

Permalink
Fixing Slider sizing when fully SizeToFit
Browse files Browse the repository at this point in the history
Fixes #197
  • Loading branch information
ecton committed Oct 23, 2024
1 parent 62dded1 commit 0e0c26f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 0e0c26f

Please sign in to comment.