Skip to content

Commit

Permalink
Fix Either using wrong paint insets (#1299)
Browse files Browse the repository at this point in the history
* Fix `Either` using wrong paint insets

* Update changelog
  • Loading branch information
andrewhickman authored Oct 12, 2020
1 parent e6bba98 commit 4f046f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 4f046f1

Please sign in to comment.