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

Fix clipbox bug. #1448

Merged
merged 2 commits into from
Dec 7, 2020
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ You can find its changes [documented below](#060---2020-06-01).

### Fixed

- `ClipBox` should forward events if any child is active, not just the immediate child. ([#1448] by [@derekdreery])
- macOS: Timers not firing during modal loop. ([#1028] by [@xStrom])
- GTK: Directory selection now properly ignores file filters. ([#957] by [@xStrom])
- GTK: Don't crash when receiving an external command while a file dialog is visible. ([#1043] by [@jneem])
Expand Down Expand Up @@ -126,6 +127,7 @@ You can find its changes [documented below](#060---2020-06-01).
- Ensure that `LifeCycle::WidgetAdded` is the first thing a widget sees. ([#1259] by [@finnerale])
- Fix a missed call to `CloseClipboard` on Windows. ([#1410] by [@andrewhickman])
- WidgetPod: change not laid out `debug_panic` to warning ([#1441] by [@Maan2003])

### Visual

- `TextBox` stroke remains inside its `paint_rect`. ([#1007] by [@jneem])
Expand Down Expand Up @@ -359,6 +361,7 @@ Last release without a changelog :(
[@andrewhickman]: https://github.com/andrewhickman
[@colinfruit]: https://github.com/colinfruit
[@Maan2003]: https://github.com/Maan2003
[@derekdreery]: https://github.com/derekdreery

[#599]: https://github.com/linebender/druid/pull/599
[#611]: https://github.com/linebender/druid/pull/611
Expand Down Expand Up @@ -546,6 +549,7 @@ Last release without a changelog :(
[#1433]: https://github.com/linebender/druid/pull/1433
[#1438]: https://github.com/linebender/druid/pull/1438
[#1441]: https://github.com/linebender/druid/pull/1441
[#1448]: https://github.com/linebender/druid/pull/1448

[Unreleased]: https://github.com/linebender/druid/compare/v0.6.0...master
[0.6.0]: https://github.com/linebender/druid/compare/v0.5.0...v0.6.0
Expand Down
2 changes: 1 addition & 1 deletion druid/src/widget/clip_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl<T, W: Widget<T>> ClipBox<T, W> {
impl<T: Data, W: Widget<T>> Widget<T> for ClipBox<T, W> {
fn event(&mut self, ctx: &mut EventCtx, ev: &Event, data: &mut T, env: &Env) {
let viewport = ctx.size().to_rect();
let force_event = self.child.is_hot() || self.child.is_active();
let force_event = self.child.is_hot() || self.child.has_active();
if let Some(child_event) =
ev.transform_scroll(self.viewport_origin().to_vec2(), viewport, force_event)
{
Expand Down