Skip to content

Commit

Permalink
fix(core): 🐛 Fix setting opacity to zero not applying to child elements
Browse files Browse the repository at this point in the history
  • Loading branch information
wjian23 committed Dec 16, 2024
1 parent dc0fa7c commit d5eec2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Please only add new entries below the [Unreleased](#unreleased---releasedate) he

- **core**: fix mismatch of providers. (#669 @wjian23)
- **core**: Added DeclarerWithSubscription to let Widget `Expanded` accept pipe value. (#669 @wjian23)
- **core**: fix set opacity zero no work to it's children. (#pr @wjian23)

## [0.4.0-alpha.18] - 2024-12-11

Expand Down
2 changes: 1 addition & 1 deletion core/src/builtin_widgets/opacity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ impl WrapRender for Opacity {
}

fn paint(&self, host: &dyn Render, ctx: &mut PaintingCtx) {
ctx.painter().apply_alpha(self.opacity);
if self.opacity > 0. {
ctx.painter().apply_alpha(self.opacity);
host.paint(ctx)
}
}
Expand Down

0 comments on commit d5eec2b

Please sign in to comment.