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 Either using wrong paint insets #1299

Merged
merged 2 commits into from
Oct 12, 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ You can find its changes [documented below](#060---2020-06-01).
- TextBox doesn't reset position after unfocused. ([#1276] by [@sysint64])
- Able to select text in multiple TextBoxes at once. ([#1276] by [@sysint64])
- The scroll bar now shows when the contents of a scrollable area change size. ([#1278] by [@Majora320])
- Fix `widget::Either` using the wrong paint insets ([#1299] by [@andrewhickman])

### Visual

Expand Down Expand Up @@ -330,6 +331,7 @@ Last release without a changelog :(
[@koutoftimer]: https://github.com/koutoftimer
[@tay64]: https://github.com/tay64
[@JAicewizard]: https://github.com/JAicewizard
[@andrewhickman]: https://github.com/andrewhickman

[#599]: https://github.com/linebender/druid/pull/599
[#611]: https://github.com/linebender/druid/pull/611
Expand Down Expand Up @@ -494,6 +496,7 @@ Last release without a changelog :(
[#1278]: https://github.com/linebender/druid/pull/1278
[#1280]: https://github.com/linebender/druid/pull/1280
[#1298]: https://github.com/linebender/druid/pull/1298
[#1299]: https://github.com/linebender/druid/pull/1299

[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/either.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl<T: Data> Widget<T> for Either<T> {
let size = self.false_branch.layout(ctx, bc, data, env);
self.false_branch
.set_layout_rect(ctx, data, env, size.to_rect());
ctx.set_paint_insets(self.true_branch.paint_insets());
ctx.set_paint_insets(self.false_branch.paint_insets());
size
}
}
Expand Down