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

Set a shadow path on Box #137

Merged
merged 3 commits into from
Aug 12, 2020
Merged

Set a shadow path on Box #137

merged 3 commits into from
Aug 12, 2020

Conversation

kylebshr
Copy link
Contributor

Setting an explicit shadow path improves performance, since the system doesn't have to draw the contents of the view offscreen first to figure out the shadow path itself. While this prevents the shadow from being applied to the view contents if the background is transparent, this seems like reasonable default behavior for Box since it is, well, a "box."

@kylebshr kylebshr requested review from watt and kyleve August 12, 2020 17:57
Copy link
Collaborator

@watt watt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat

@kylebshr
Copy link
Contributor Author

6e7bd30c1770ec12ce304221f8801b2b

@kylebshr kylebshr merged commit 1c1560c into main Aug 12, 2020
@bencochran
Copy link
Contributor

Did a quick cursory glance to make sure no one in POS was relying on the old behavior, and everyone that specifies a shadow style also has a background color, so we should be safe with this

@kylebshr
Copy link
Contributor Author

Good thinking, thanks for checking @bencochran!

kyleve added a commit that referenced this pull request Sep 10, 2020
* origin/main: (28 commits)
  Update CHANGELOG.md
  Add convenience methods for adding children to stacks
  Doc publishing github workflow
  jazzy doc generation
  Bump versions to 0.14.0
  Update changelog
  Update release instructions
  Set a shadow path on Box (#137)
  Update changelog
  Add window size to environment
  Responsive layout demo with GeometryReader
  Add GeometryReader
  Update changelog for adding textColor on TextField
  Add textColor to TextField
  Default delaysContentTouches to true (#132)
  Update Tutorial2.md
  Update Tutorial2.md
  Update Tutorial2.md
  Update Tutorial2.md
  Update Element.md
  ...
@kylebshr kylebshr deleted the kb/box-shadow-path branch May 22, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants