1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00
Commit Graph

90 Commits

Author SHA1 Message Date
Gautier Cailly
16cad760a5 Integrate harfrust for text shaping (#8031)
* Related to #56 (Improve text — tracking issue)

## Summary

This PR integrates [harfrust](https://crates.io/crates/harfrust) (a
pure-Rust port of HarfBuzz) into epaint's text layout pipeline,
replacing the character-by-character glyph positioning with proper
OpenType text shaping.

### What this enables

- **GPOS kerning**: most modern fonts only ship kerning in GPOS tables
(not the legacy `kern` table). Pairs like "AV", "VA", "AT" are now
properly tightened.
- **GSUB substitutions**: ligatures (fi, fl), contextual alternates, and
other OpenType features.
- **Combining marks**: diacritics (e.g. ɔ̃) are positioned via anchor
tables instead of being rendered as standalone replacement glyphs.

### Before/After

#### Kerning, etc.

<img width="838" height="726" alt="before_main"
src="https://github.com/user-attachments/assets/f0f26d5f-b117-43a6-b39c-ea40d2e73836"
/>

<img width="838" height="726" alt="after_harfrust"
src="https://github.com/user-attachments/assets/d983e5da-486c-4f39-bd4f-5782a90c6b39"
/>

 #### Ligatures

<img width="1117" height="698" alt="before_closeup"
src="https://github.com/user-attachments/assets/7a3b08b4-cf6f-45b7-98ba-07c473cd3b02"
/>

<img width="1117" height="698" alt="after_closeup"
src="https://github.com/user-attachments/assets/6cfc5f21-d32f-4f09-be0c-59c8c553d44f"
/>

### Architecture

The shaping integrates into the existing pipeline without changing the
public API:

1. **`Font::segment_into_runs`** — segments text into contiguous runs by
font face (grapheme-cluster aware, never splits combining sequences)
2. **`FontFace::shape_text`** — calls harfrust to shape each run,
returning glyph IDs + positioned advances/offsets
3. **`layout_shaped_run`** — emits `Glyph` structs from the shaping
output, with NOTDEF fallback to other font faces for missing glyphs
4. **Buffer recycling** — `FontsImpl` pools a `harfrust::UnicodeBuffer`
to avoid per-layout allocations

### Disclaimer

I'm far from being a good Rust programmer. Claude Code did most of the
heavy lifting here. I did my best and used my limited knowledge to avoid
making too many mistakes. If this PR isn't up to quality standards,
please don't hesitate to close it.

## Test plan

- [x] `cargo test -p epaint` — all 18 text tests pass, including 6 new
ones
- [x] `cargo clippy -p epaint --all-features` — clean
- [x] `cargo fmt` — clean
- [ ] Snapshot tests need regeneration (expected: shaping changes glyph
positions)
- New tests added:
- `test_gpos_kerning` — verifies GPOS kerning tightens "AV", "VA", "AT"
pairs
- `test_combining_diacritics` — combining tilde doesn't add extra width
  - `test_shaping_basic_latin` — sanity check for Latin text
  - `test_shaping_empty_string` — empty input doesn't panic
  - `test_shaping_multiple_newlines` — newline splitting works correctly
  - `test_shaping_mixed_font_fallback` — Latin + emoji in same string

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2026-04-06 14:25:04 +02:00
Emil Ernerfeldt
4a09782fce Enable a few more clippy lints (#8064)
Enable these new clippy lints and fix all warnings:

* `format_push_string` — use `write!` instead of `s += &format!(…)` to
avoid extra allocations
* `ignored_unit_patterns` — use `()` instead of `_` when matching unit
* `missing_fields_in_debug` — ensure manual `Debug` impls account for
all fields
* `needless_raw_string_hashes` — remove unnecessary `r#` on string
literals
* `ref_option` — prefer `Option<&T>` over `&Option<T>` in function
signatures
2026-04-04 16:20:29 +02:00
Emil Ernerfeldt
c2b482ff7e Flip if-else:s with a negation (#8063) 2026-04-04 12:03:41 +02:00
Emil Ernerfeldt
048f8ccd2a Tweak ScrollArea fade effect (#8023)
* Follow-up to https://github.com/emilk/egui/pull/8018
2026-03-25 15:44:41 +01:00
Emil Ernerfeldt
0b0c561a81 Fade out the edges of ScrollAreas (#8018)
## Before:
<img width="381" height="307" alt="image"
src="https://github.com/user-attachments/assets/0528ae2a-44bf-4d9e-89a4-c3f4ab438eb2"
/>

It is very hard here to realize this is a scrollable area

## After
<img width="383" height="310" alt="image"
src="https://github.com/user-attachments/assets/9e0ee6de-8b96-4e5c-a505-f57977010990"
/>

The fade at the bottom tells the user they should try scrolling.

You can turn if off with `style.spacing.scroll.fade.enabled`
2026-03-25 12:53:00 +01:00
Lucas Meurer
0d065f9e78 Add Response::parent_id and improve warn_if_rect_changes_id (#8010)
Reduces the amount of false positives

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2026-03-24 16:22:44 +01:00
Emil Ernerfeldt
a1af9abe70 Shrink the byte-size of Response slightly (#8011)
Small optimization! 96 -> 88 bytes, so no huge win.
2026-03-24 15:46:56 +01:00
Ryan Bluth
5d5f0dedcc Allow rotation of rectangles and ellipses (#7682)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* 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 test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* 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!
-->

Added the ability to rotate rectangles and ellipses. Similar to the
existing text implementation

* [x ] I have followed the instructions in the PR template
2026-03-24 13:58:02 +01:00
ilya sheprut
cc7cfd27ca Fix horizontal_wrapping row height after using text_edit_multiline (#8000)
* [x] I have followed the instructions in the PR template

This PR have two commits:
* **First commit** - introduction of tests and their canonization image.
Expected behaviour is that `horizontal_wrapped_multiline_row_height`
would match `horizontal_wrapped_multiline_row_height_reference`, but it
doesn't. There is a bug in `horizontal_wrapped` that breaks line height
after using `text_edit_multiline`.
* **Second commit** - fix. You can see that
`horizontal_wrapped_multiline_row_height` now looks like
`horizontal_wrapped_multiline_row_height_reference` (although it's not a
perfect match, upd: found, this is because of this issue:
https://github.com/emilk/egui/issues/4921).

I have used LLM to help me with this PR (codex + claude code).

BTW, I'm using horizontal_wrapped with end_row instead of vertical +
horizontal alternation, because I automatically generate my UI through
some complex interactions between elements in my code, and it's can be
that my `horizontal` starts in one function, and ends in another.
Something like `begin_horizontal`/`end_horizontal`/`get_current_layout`
would be very handy, related to
https://github.com/emilk/egui/issues/1004.

Also, I would like indent to be supported in `horizontal_wrapped`, or
also, to have `indent_start`/`indent_end`. This is why I used
`monospace("| ")` in my example, it simulates my use-case.
2026-03-24 11:37:37 +01:00
RndUsr123
2a03ae1348 Enables every combination of TextEdit and LayoutJob alignments (#7831)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* 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 test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* 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 is a fix/improvement that makes all kinds of alignments work in
`TextEdit` when a custom `LayoutJob` with halign is used.


I used the simplest approach possible to avoid unwanted bugs as I wasn't
sure what's safe to change, but there's potentially better ways to
achieve this. In particular, I'm not sure I fully understand the
rationale behind aligning rows in a `Galley` based on the latter's
leftmost border, considering the size is what's ultimately used in
widgets (in `TextEdit` at least).

Regardless, here's a demo of this PR:


https://github.com/user-attachments/assets/5d9801d7-73af-4576-80c5-47f169700462


* [x] I have followed the instructions in the PR template

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2026-03-24 11:35:37 +01:00
Emil Ernerfeldt
49fad9a7b2 Roll out new egui icon and logo (#7995)
For the first time _ever_, egui has a logo!

<img width="3925" height="1406" alt="egui-logo"
src="https://github.com/user-attachments/assets/cfaf1d43-9338-490f-ae82-99b420baa1b0"
/>

Made by [Studio Gruhl](https://www.studiogruhl.com/) and paid for by
[Rerun.io](https://rerun.io/).
2026-03-21 22:47:15 +01:00
Lucas Meurer
8b2315375b TextEdit Atom prefix/suffix (#7587)
* part of https://github.com/emilk/egui/issues/7264
* part of https://github.com/emilk/egui/issues/7445

This PR changes the layout within the TextEdit to be done with
AtomLayout. It also adds a Prefix and Postfix that allows adding
permanent icons / icon buttons within the textedit.

Breaking changes:
- Removed `TextEdit::hint_text_font`. Hint text is an atom now, so the
font can be set that way

<img width="264" height="130" alt="Screenshot 2025-10-06 at 12 25 21"
src="https://github.com/user-attachments/assets/03b6b56b-ca82-4ac3-b5c0-585cca336834"
/>

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: lucasmerlin <8009393+lucasmerlin@users.noreply.github.com>
2026-03-20 11:29:32 +01:00
Emil Ernerfeldt
265cf7ebae Add DebugOptions::warn_if_rect_changes_id (#7984)
If turned on (default in debug builds), if the exact same `Rect` exist
in two subsequent frames but with different `Id`s, a warning is logged
an a red rect is flashed on the screen.
2026-03-18 15:08:06 +01:00
Lucas Meurer
14afefa252 Fix galley width calculation being off due to subpixel binning (#7972)
- fix for https://github.com/rerun-io/reality/pull/1075

The galleys row size was calculated by looking at the last glyphs pos_x,
which got changed to be rounded to integers when we added subpixel
binning. This introduced a subtle bug which caused the width of galleys
to be slightly off.
This PR fixes this by looking at the actual cursor position instead,
which is not rounded.

Also added a test to ensure this is correct. Previously, for the second
and last line, the `x` was too close to the `0`.

<img width="48" height="67" alt="image"
src="https://github.com/user-attachments/assets/a69a4cc3-b3f3-4553-ab92-73cb2e7a358c"
/>

---------

Co-authored-by: lucasmerlin <8009393+lucasmerlin@users.noreply.github.com>
2026-03-12 13:49:16 +01:00
Lucas Meurer
a354c02e76 Add Atom prefix/suffix support to DragValue (#7949) 2026-03-03 11:35:29 +01:00
Emil Ernerfeldt
2be6e225bf Add ViewportInfo::occluded and visible (#7948)
* Part of https://github.com/emilk/egui/issues/5112
* Part of https://github.com/emilk/egui/issues/5113
* Part of https://github.com/emilk/egui/issues/5136

Once we support calling `App::logic` when an app is occluded or
minimized, it is useful to know that it is, in fact, occluded or
minimized.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-02 18:36:04 +01:00
Lucas Meurer
b3ffbca2ab Prevent snapshot update workflow to run on main (#7842)
Turns out if you don't give the gh workflow dispatch a ref it runs it on
main, oops
2026-01-13 11:39:53 +01:00
lucasmerlin
73b7b9e225 Update snapshot images 2026-01-13 10:22:14 +00:00
Emil Ernerfeldt
9e95b9ca50 Don't expand widgets on hover (#7808)
* Part of https://github.com/emilk/egui/issues/5605

This changes the default style of egui.

The problem with "expanding" widgets is that they now want to paint
outside their own bounds, which then requires all parent UIs to have
proper margins.

It also means hovered things are no longer properly aligned with every
other widget.
2025-12-22 22:30:53 +01:00
Jasper Riedel
661d5f9173 Update MSRV from 1.88 to 1.92 (#7793) 2025-12-20 13:52:34 +01:00
Emil Ernerfeldt
8d98763fe1 Replace #[allow attributes with expect (#7796)
We do have `clippy::allow_attributes` turned on, but it doesn't seem to
work properly
2025-12-19 20:55:50 +01:00
Emil Ernerfeldt
7fe58bbfd4 Forbid uses of unwrap() in the code (#7795) 2025-12-19 20:34:18 +01:00
Emil Ernerfeldt
986c2c0ffb Use explicit Arc::clone to clarify when clones are cheap (#7784) 2025-12-17 17:19:18 +01:00
AdrienZ.
9c3a0bb37c Per-widget style (#7667)
* Closes <https://github.com/emilk/egui/issues/7586>

Implementation of the per-widget style of the action plan to add better
styling option to egui

---------

Co-authored-by: adrien <221212@umons.ac.be>
Co-authored-by: Adrien Zianne <adrien@iq002.ipa.iqrypto.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-12-16 18:49:27 +01:00
Emil Ernerfeldt
2f6fe9c572 eframe: Replace Frame::update with fn logic and fn ui (#7775)
* Part of https://github.com/emilk/egui/issues/5113
* Part of https://github.com/emilk/egui/issues/3524

## What
This deprecates `eframe::App::update` and replaces it with two new
functions:

```rs
pub trait App {
	/// Called just before `ui`, and in the future this will
    /// also be called for background apps when needed.
	fn logic(&mut self, ctx: &egui::Context, frame: &mut Frame) { }
	
    /// Show your user interface to the user.
	fn ui(&mut self, ui: &mut egui::Ui, frame: &mut Frame);

	…
}
```

Similarly, `Context::run` is deprecated in favor of `Context::run_ui`.

`Plugin`s are now handed a `Ui` instead of just a `Context` in
`on_begin/end_frame`.

## TODO
…either in this PR or a later one
* [x] Deprecate `App::update`
* [x] Deprecate `Context::run`
* [x] Change plugins to get a `Ui`
* [x] Update kittest
* [x] Change viewports to get UI:s (`show_viewport_immediate` etc)
  - https://github.com/emilk/egui/pull/7779

## Later PRs
* [ ] Deprecate `Panel::show`
* [ ] Deprecate `CentralPanel::show`
* [ ] Deprecate `CentralPanel` ?
2025-12-16 17:05:50 +01:00
Emil Ernerfeldt
9487dc35ec Viewports: give the caller a Ui instead of Context (#7779)
* Part of https://github.com/emilk/egui/issues/3524

This is a breaking change, as it changes the how embedded viewports
work.
Before it was up to the user to display a `egui::Window` if they wanted.
Now egui creates an `egui::Window` for you, so you only need to add the
contents.

To signal this change in behavior, `ViewportClass::Embedded` is gone and
is now called `ViewportClass::EmbeddedWindow`.
2025-12-15 18:51:57 +01:00
Emil Ernerfeldt
bfaf1b44f2 Replace ui.ctx().foo with ui.foo in a few places (#7774)
Internal code cleanup after
* https://github.com/emilk/egui/pull/7770
2025-12-14 17:12:10 +01:00
valadaptive
609dd2d28e Replace ab_glyph with Skrifa + vello_cpu; enable font hinting (#7694)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* 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 test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* 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!
-->

* Closes N/A
* [x] I have followed the instructions in the PR template

I'll probably come back to this and clean it up a bit. This PR
reimplements ab_glyph's functionality on top of Skrifa, a somewhat
lower-level font API that's being used in Chrome now.

Skrifa doesn't perform rasterization itself, so I'm using
[vello_cpu](https://github.com/linebender/vello) from the Linebender
project for rasterization. It's still in its early days, but I believe
it's already quite fast. It also supports color and gradient fills, so
color emoji support will be easier.

Skrifa also supports font hinting, which should make text look a bit
nicer / less blurry.

Here's the current ab_glyph rendering:

<img width="1592" height="1068" alt="image"
src="https://github.com/user-attachments/assets/2385b66e-23f8-4c6e-b8c2-ea90e0eea4e4"
/>

Here's Skrifa *without* hinting--it looks almost identical, but there
are some subpixel differences, probably due to rasterizer behavior:

<img width="1592" height="1068" alt="image"
src="https://github.com/user-attachments/assets/a815f3e9-65ac-4940-bc00-571177bef53d"
/>

Here's Skrifa  *with* hinting:

<img width="1592" height="1068" alt="image"
src="https://github.com/user-attachments/assets/d6cc0669-3537-4377-bba9-ed5ef09664db"
/>

Hinting does make the horizontal strokes look a bit bolder, which makes
me wonder once again about increasing the font weight from "light" to
"regular".

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-12-06 16:11:33 +01:00
Yichi Zhang
8d3539b6da test_viewports: fix assertion (#7693)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* 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 test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* 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!
-->
* [x] I have followed the instructions in the PR template
These assertions allows col == COLS, while when col == COLS, array may
be out of bounds. In `fn init`, `for i in 0..COLS {self.insert(...`
confirms the assertions' predicate col <= COLS should be changed into
col < COLS.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-11-24 09:56:24 +01:00
Bruno Paré-Simard
5b6a0196f9 Add Panel to replace SidePanel and TopBottomPanel (#5659)
This combines `SidePanel` and `TopBottomPanel` into a single `Panel`.

The old types are still there as type aliases, but are deprecated.

`.min_width(…)` etc are now called `.min_size(…)` etc.

Again, the old names are still there, but deprecated.

(edited by @emilk)

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-11-18 15:46:01 +01:00
Emil Ernerfeldt
f74b7c7e79 Paint mouse cursor in kittest snapshot images (#7721)
Very simple triangle shape, but helps understand why a widget has a
hovered effect
2025-11-18 06:24:03 +01:00
Emil Ernerfeldt
dc0acd2dd1 clippy +nightly fix (#7723) 2025-11-17 05:10:43 +01:00
Lucas Meurer
ecee85fc6b Fix ui.response().interact(Sense::click()) being flakey (#7713)
This fixes calls to `ui.response().interact(Sense::click())` being
flakey. Since egui checks widget interactions at the beginning of the
frame, based on the responses from last frame, we need to ensure that we
always call `create_widget` on `interact` calls, otherwise there can be
a feedback loop where the `Sense` egui acts on flips back and forth
between frames.

Without the fix in `interact`, both the asserts in the new test fail.

Here is a video where I experienced the bug, showing the sense switching
every frame. Every other click would fail to be detected.


https://github.com/user-attachments/assets/6be7ca0e-b50f-4d30-bf87-bbb80c319f3b

Also note, usually it's better to use `UiBuilder::sense()` to give a Ui
some sense, but sometimes you don't have the flexibility, e.g. in a `Ui`
callback from some code external to your project.
2025-11-13 13:52:13 +01:00
Emil Ernerfeldt
93425ae06b Allow multiple atoms in Button::shortcut_text and right_text (#7696)
Useful when intermixing text and icons (e.g. for modifiers)
2025-11-10 16:34:58 +01:00
Lucas Meurer
04913ed651 Add some more text edit tests (#7608)
Adds tests to text the clip option in text edits and how it behaves with
a placeholder

---------

Co-authored-by: lucasmerlin <8009393+lucasmerlin@users.noreply.github.com>
2025-11-07 13:34:25 +01:00
Lucas Meurer
1e63bfd657 Improve accessibility and testability of ComboBox (#7658)
Changed it to use labeled_by to avoid kittest finding the label when
searching for the ComboBox and also set the value so a screen reader
will know what's selected.
2025-11-07 13:34:18 +01:00
Emil Ernerfeldt
d50287b83c Add taplo.toml for toml formatting (#7618) 2025-10-09 15:38:00 +02:00
Lucas Meurer
3fdc5641aa Group AccessKit nodes by Ui (#7386)
* closes https://github.com/emilk/egui/issues/5674

This changes egui to create an AccessKit node for each `Ui`. I'm not
sure if this alone will directly improve accessibility, but it should
make it easier to create the correct parent / child relations (e.g.
grouping menus as children of menu buttons).
Instead of having a global stack of parent ids, they are now passed via
a parent_id field in `UiBuilder`.

If having all these `GenericContainer` nodes somehow is bad for
accessibility, the PR could also be changed to only create nodes if
there is actually some accessibility info with it (the relevant is
currently commented-out in the PR). But I think screen readers should
just ignore these nodes, so it should be fine? We could also use this as
motivation to git red of some unnecessary wrapped `Ui`s, e.g.
CentralPanel creates 3 Uis when 2 should be enough (the initial Ui and a
Frame, maybe we could even only show the `Frame` if we can give it an
UiBuilder and somehow show the Frame with `Ui::new`).

Here is a screenshot from the accessibility inspector
(https://github.com/emilk/egui/pull/7368) with this PR:

<img width="431" height="744" alt="Screenshot 2025-07-24 at 12 09 55"
src="https://github.com/user-attachments/assets/6c4e5ff6-5c38-450e-9500-0776c9018d8c"
/>

Without this PR:


https://github.com/user-attachments/assets/270e32fc-9c7a-4dad-8c90-7638c487a602
2025-10-08 11:30:32 +02:00
Emil Ernerfeldt
843ceea90c Use more workspace dependencies (#7596) 2025-10-07 15:07:16 +02:00
Ian Hobson
30277233ce Add support for the safe area on iOS (#7578)
This PR is a continuation of #4915 by @frederik-uni and @lucasmerlin
that introduces support for keeping egui content within the 'safe area'
on iOS (avoiding the notch / dynamic island / menu bar etc.), with the
following changes:

- `SafeArea` now wraps `MarginF32` and has been renamed to
`SafeAreaInsets` to clarify its purpose.
- `InputState::screen_rect` is now marked as deprecated in favour of
either `viewport_rect` (which contains the entire screen), or
`content_rect` (which is the viewport rect with the safe area insets
removed).
- I added some comments to the safe area insets logic pointing out the
[safe area API coming in winit
v0.31](https://github.com/rust-windowing/winit/issues/3910).

---------

Co-authored-by: frederik-uni <147479464+frederik-uni@users.noreply.github.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-10-07 12:30:09 +02:00
Andreas Reich
4c1f344ef8 Update MSRV from 1.86 to 1.88 (#7579)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-10-02 19:12:29 +02:00
Lucas Meurer
a73f2c356f Add text edit rtl regression test (#7524) 2025-09-23 11:56:32 +02:00
Lucas Meurer
2d3ecd3494 Reset wrapping in label tooltip (#7535)
* follow up to #7514 

That PR changed the tooltip to preserve the wrapping, which made the
tooltip kind of useless. With this PR the wrapping is reset for the
tooltip.
2025-09-11 17:18:53 +02:00
Emil Ernerfeldt
72b9b9d750 Increase default text size from 12.5 to 13.0 (#7521) 2025-09-09 15:47:24 +02:00
valadaptive
d5b0a6f446 More even text kerning (#7431)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-09-08 17:29:41 +02:00
Lucas Meurer
e5d0b93633 Preserve text format in truncated label tooltip (#7514)
* Related https://github.com/rerun-io/rerun/issues/10906

This changes the label hover ui to use the provided layout job instead
of the text so that the text format is preserved.
2025-09-08 15:41:05 +02:00
Emil Ernerfeldt
aedd43c88f kittest: Add UPDATE_SNAPSHOTS=force (#7508)
This adds a new mode, `UPDATE_SNAPSHOTS=force`, which will lower the
threshold to zero, overwriting every image that is not _exactly_ the
same.

Most comparisons has a threshold because different GPUs render slightly
differently. However, setting that threshold accurately can be hard.

Sometimes a test will pass locally, but fail on CI. In those cases you
want to force an update of the failing test. You can use
`UPDATE_SNAPSHOTS=force` for that.

And sometimes a small change _should_ update all images, but the change
is so tiny that it falls under the threshold. Still, you want to make a
point of showing that these images have changes. You can use
`UPDATE_SNAPSHOTS=force` for that.
2025-09-05 16:45:36 +02:00
Emil Ernerfeldt
531ead5ad1 Update MSRV to 1.86 (#7469) 2025-08-21 15:38:41 +02:00
Emil Ernerfeldt
36a4981f29 Enable clippy::iter_over_hash_type lint (#7421)
This helped discover a few things that _might_ have been buggy.
2025-08-06 13:55:53 +02:00
Lucas Meurer
14c2e5d3d5 Set intrinsic size for Label (#7328)
Sets intrinsic size for labels
2025-07-10 10:48:14 +02:00