egui/crates
Emil Ernerfeldt 2a40d16e5a
Center-align all text vertically (#5117)
* Closes https://github.com/emilk/egui/issues/4929
* Builds on top of https://github.com/emilk/egui/pull/2724 by @lictex
(ptal!)
* Implement `Center` and `Max` vertical text alignment properly
* Change default vertical alignment of text to centering

The end result is that text centers better in buttons and other places,
especially when mixing in emojis.
Before, mixing text of different heights (e.g. emojis and latin text) in
a label or button would cause the text to jump vertically.

## Before
This is `master`, with custom `FontTweak` to move fonts up and down:
<img width="1714" alt="image"
src="https://github.com/user-attachments/assets/a10e2927-e824-4580-baea-124c0b38a527">
<img width="102" alt="image"
src="https://github.com/user-attachments/assets/cd41f415-197b-42cd-9558-d46d63c21dcb">


## After
This PR, with the default (zero) `FontTweak`

<img width="102" alt="image"
src="https://github.com/user-attachments/assets/15e7d896-66b1-4996-ab58-dd1850b19a63">

<img width="1714" alt="image"
src="https://github.com/user-attachments/assets/54ec708c-7698-4754-b1fc-fea0fd240ec9">
2024-09-19 11:44:29 +02:00
..
ecolor Use precomputed lookup table in Color32::from_rgba_unmultiplied (#5088) 2024-09-10 09:50:56 +02:00
eframe Fix: call `save` when hiding tab, and `update` when focusing it (#5114) 2024-09-16 16:28:54 +02:00
egui Center-align all text vertically (#5117) 2024-09-19 11:44:29 +02:00
egui-wgpu Update sampler along with texture on wgpu backend (#5122) 2024-09-19 09:16:42 +02:00
egui-winit Add `Context::request_discard` (#5059) 2024-09-13 14:20:51 +02:00
egui_demo_app Fix some minor clippy lints from the future 2024-09-18 09:44:23 +02:00
egui_demo_lib Center-align all text vertically (#5117) 2024-09-19 11:44:29 +02:00
egui_extras Fix some minor clippy lints from the future 2024-09-18 09:44:23 +02:00
egui_glow Update `glow` to 0.14 (#4952) 2024-09-09 14:02:06 +02:00
egui_plot Move `egui_plot` to its own repo (#4828) 2024-07-15 18:45:19 +02:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Use `log` crate instead of `eprintln` & remove some unwraps (#5010) 2024-09-13 14:23:13 +02:00
epaint Center-align all text vertically (#5117) 2024-09-19 11:44:29 +02:00
epaint_default_fonts Enable rustdoc `generate-link-to-definition` feature on docs.rs (#5030) 2024-08-30 11:22:29 +02:00