-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
CSS-like shadows with offset, spread, and blur #4232
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tweaks the default shadows for windows and popups to be smaller, and with an offset
This was referenced Mar 26, 2024
emilk
added a commit
to rerun-io/rerun
that referenced
this pull request
Mar 26, 2024
### What Based on: * emilk/egui#4232 * emilk/egui#4230 * emilk/egui#4233 ## Before <img width="402" alt="Screenshot 2024-03-26 at 11 17 57" src="https://github.com/rerun-io/rerun/assets/1148717/3a5f8d1d-ecff-49fe-8d7e-2a8a85289526"> <img width="581" alt="Screenshot 2024-03-26 at 11 17 40" src="https://github.com/rerun-io/rerun/assets/1148717/fad07dd5-076a-4bf0-a8cd-dcb1369eddf8"> ## After <img width="599" alt="Screenshot 2024-03-26 at 11 20 36" src="https://github.com/rerun-io/rerun/assets/1148717/dc4cc6d4-a117-4b6b-81b3-3fff6f64f247"> <img width="421" alt="Screenshot 2024-03-26 at 11 20 43" src="https://github.com/rerun-io/rerun/assets/1148717/857b4767-17cd-4c23-8e28-4bd03881faed"> ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/5680/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/5680/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/5680/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/5680) - [Docs preview](https://rerun.io/preview/003d45654e7ddf9335aa82d9c50d67dd5a0695c6/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/003d45654e7ddf9335aa82d9c50d67dd5a0695c6/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
hacknus
pushed a commit
to hacknus/egui
that referenced
this pull request
Oct 30, 2024
This makes `epaint::Shadow` more like CSS's box-shadow, adding `offset` and replacing `extrusion` with `blur` and `spread`. * Closes emilk#3047 The offsets make for nice drop-shadow effects. Old shadows: <img width="1447" alt="old-shadows" src="https://github.com/emilk/egui/assets/1148717/8a30f7b9-fb9d-49ea-9a2f-9367a60c448a"> New shadows: <img width="1447" alt="new-shadows-full" src="https://github.com/emilk/egui/assets/1148717/28cc9c1e-b0de-4c5b-a705-22e52c556584">
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes
epaint::Shadow
more like CSS's box-shadow, addingoffset
and replacingextrusion
withblur
andspread
.The offsets make for nice drop-shadow effects.
Old shadows:
New shadows: