egui/crates/egui_demo_lib
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
..
benches Add `Context::request_discard` (#5059) 2024-09-13 14:20:51 +02:00
data Release 0.23.0 - New image API 2023-09-28 08:44:33 +02:00
src Center-align all text vertically (#5117) 2024-09-19 11:44:29 +02:00
Cargo.toml Enable rustdoc `generate-link-to-definition` feature on docs.rs (#5030) 2024-08-30 11:22:29 +02:00
README.md Move all crates into a `crates` directory (#1940) 2022-08-20 10:41:49 +02:00

README.md

egui demo library

Latest version Documentation unsafe forbidden MIT Apache

This crate contains example code for egui.

The demo library is a separate crate for three reasons: