diff --git a/CHANGELOG.md b/CHANGELOG.md index 80048bbd94..681aaeaf79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 @@ -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 diff --git a/druid/src/widget/either.rs b/druid/src/widget/either.rs index c3fc4faf6a..5725fd7e56 100644 --- a/druid/src/widget/either.rs +++ b/druid/src/widget/either.rs @@ -85,7 +85,7 @@ impl Widget for Either { 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 } }