1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Add opacity factor to TextShape (#3916)

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

This PR simply allows you to override the opacity of a Galley when you
draw it on screen. Last year I opened #3548 and some changes were
requested to the PR, but unfortunately school got really busy and I
wasn't able to apply them. This PR supersedes #3548 and applys the
changes requested in that PR

Closes #3548
This commit is contained in:
StratusFearMe21
2024-01-30 14:55:18 +00:00
committed by GitHub
parent 527f4bfdf6
commit 945a69d2f2
3 changed files with 22 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ pub fn adjust_colors(shape: &mut Shape, adjust_color: &impl Fn(&mut Color32)) {
underline,
fallback_color,
override_text_color,
opacity_factor: _,
angle: _,
}) => {
adjust_color(&mut underline.color);