* Closes <https://github.com/emilk/egui/issues/8620>
* [x] I have followed the instructions in the PR template
With `scene_rect = Rect::ZERO`, `fit_to_rect_in_scene` computed an
infinite scale. The default zoom range (max `1.0`) clamps that, but
`0.0..=f32::INFINITY` does not, so the translation became `center - ∞ *
0 = NaN`, which ended up as a NaN widget rect and tripped the debug
assert in `create_widget`.
We now fall back to a 1:1 scale when the computed scale is not finite
and positive. This also covers the auto-reset path when the scene
contents are empty.
Added a regression test.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add `BandShape` to epaint, supporting and varying width band along some
direction.
This can be useful in egui_plot, e.g. for filling the area under a
curve, or for visualizing a audio waveform, for instance.
The band has feathering for the fill, plus an optional stroke that is
just drawn on top of the fill.
This solves a small subset of non-convex polygons (since the general
solution is quite difficult, at least if you want feathered edges).
<img width="493" height="180" alt="Screenshot 2026-09-01 at 20 56 33"
src="https://github.com/user-attachments/assets/f79ae9bc-3512-4c87-b166-d1240a8dd3e4"
/>
Includes an interactive waveform demo and alpha screenshot coverage.
Related work:
- https://github.com/emilk/egui/issues/513
- https://github.com/emilk/egui_plot/pull/260
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
[performance] Avoid cross-viewport GalleyCache eviction
This changes `Fonts` to keep `GalleyCache` entries partitioned by
viewport.
Previously, multiple viewports shared one galley cache. Since each
viewport flushes the cache at the start of its pass, root and child
viewports could repeatedly evict each other's text layouts.
As viewport text workload grows, this can force repeated layout of large
text contents and cause severe performance degradation, with the frame
rate dropping below 10 FPS in some cases.
Font data and the texture atlas remain shared. Only layout caches are
separated by an opaque viewport namespace.
* Closes#5249
* Related #5836
* Related #7885
* Related #8284
* Closes#8419
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Follow-up to #8611. Passing `&mut &str` is how `egui_commonmark` (and
the docs) show selectable text; it cannot be typed into any more than
`interactive(false)` can, so it now gets the same read-only mark, and
`egui_kittest` asks no name of it.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
A `Ui` gets its accessibility role from its `UiKind` (#8581). This lets
a caller pick another one, e.g. `Role::Alert` for a toast:
`Area::new(id).role(Role::Alert).accessible_name("Saved")`, or
`UiBuilder::new().accessibility_role(role)` for any `Ui`.
Rerun sets the toast role by reaching into the node from inside the `Ui`
today; @emilk asked for a builder method instead.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
A non-interactive `TextEdit` (selectable text, e.g. the code blocks
`egui_commonmark` renders) now marks its node read-only, and the
`egui_kittest` check from #8589 leaves such fields alone: there is
nothing to type into, so nothing to reach by name.
Rerun was naming those code blocks "Code block" just to pass the check;
@emilk asked for this instead.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Two ways to name every input a closure adds that has no accessible name
yet:
* `ui.label_inputs_by(label.id, |ui| …)`: after a row label, for
property rows and forms whose label is painted apart from its value
widgets, so the editors need not know the row label.
* `ui.name_inputs("Code block", |ui| …)`: a fixed name, for widgets that
cannot be named where they are built, e.g. the read-only `TextEdit`
`egui_commonmark` renders for a code block.
Only the widgets registered on the `Ui`'s layer during the closure are
inspected (the per-layer widget list is in creation order), so the cost
is one node lookup per widget added, not a walk over the whole tree per
call. Both are what #8589's check asks for and what Rerun does by poking
at `accesskit_state` from outside egui today.
`egui::accessibility::is_input(role)` decides which roles count, as an
exhaustive match over `accesskit::Role`; `egui_kittest` uses the same
function.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Panel resize separators currently register no AccessKit content: screen
readers announce an empty node and cannot adjust the split (#8557). This
exposes the handle as a `Role::Splitter` (`WidgetType::ResizeHandle`)
labeled "Resize panel", with its orientation and the panel size as a
numeric value in `0..=1` of the available space.
AccessKit `Increment`/`Decrement`/`SetValue` requests on the handle are
translated into the same size-clamping path a pointer drag uses, and
`Increment` on a collapsed panel's grab handle expands the panel,
mirroring drag-to-expand. For headless testing, the `egui_kittest`
harness gains
`increment_accesskit`/`decrement_accesskit`/`set_value_accesskit` node
helpers. Tests assert the splitter node's label, orientation, numeric
bounds and supported actions, and verify that AccessKit actions move the
split.
Fixes#8557
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Generalizes #8602 from "no font loaded yet" to "nothing laid out yet
this pass": any font, provider, rasterizer or glyph-policy change made
before the first text of a pass takes effect in that pass, since nothing
is laid out with the old fonts.
#8602 missed the case where `default_fonts` is on: an app that installs
its own fonts during its first pass then laid that pass out with the
bundled fonts, and under `MissingGlyphPolicy::Panic` any glyph they lack
(Rerun's ⏎, on a Linux CI box with no system fonts) panics. New
`Fonts::used_since_begin_pass` is what the check reads.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Follow-up to #8581, which gave every `Ui` a role. This adds the name:
`UiBuilder::accessibility_label` sets the label on the `Ui`'s node, and
`Area`, `Popup` and `Tooltip` take an `accessible_name` and pass it on.
A floating container can then be found by name
(`get_by_role_and_label(Role::Dialog, "Options")`) instead of by
reconstructing its node id. Rerun does that reconstruction today for its
modals, toasts and hover tooltips.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
An app built without `default_fonts` starts with no font at all and
installs its own, often from inside its first pass (an `egui_kittest`
harness has no earlier hook).
Fonts used to apply at the start of the *next* pass, so that first pass
laid out every string with an empty family, which since #8601 panics
under `MissingGlyphPolicy::Panic`. Rerun's tests hit this on every
harness.
Nothing laid out before the first font arrives could have used one, so
applying immediately in that case has nothing to keep consistent. With
`default_fonts` on, nothing changes.
Regression test in `egui_kittest/tests/missing_glyphs.rs`.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Adds `Rangef::union`: the smallest range containing both ranges, the
counterpart of `intersection`.
Needed for building min/max envelopes (e.g. audio waveforms) in Rerun,
where we currently spell it out as `Rangef::new(a.min.min(b.min),
a.max.max(b.max))`.
Written with Claude Code (an LLM), reviewed by @emilk.
* [x] I have followed the instructions in the PR template
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
A font family with no font at all used to lay out to an *empty galley*:
the run had no face to shape with, so it was dropped.
`Galley::clamp_cursor` on that empty galley returns 0, so a `TextEdit`
lost its cursor the frame after typing — text stayed, cursor jumped to
0, and e.g. completion popups never opened. Found in rerun's tests after
dropping `default_fonts`, where nothing installed a font for the bare
kittest harness.
### Changes
* epaint: a family without fonts now lays out **one synthetic tofu box
per grapheme cluster**, with metrics derived from the font size.
`glyphs.len() == char_count` and non-zero row heights hold even with no
font.
* epaint: new `MissingGlyphPolicy { Tofu, Panic }` on `Fonts`, consulted
only after every font, `FontProvider` and `GlyphRasterizer` had its
turn. Control characters (`\t`, `\n`, …) never panic, since fonts have
no glyphs for them. The panic names the character, the family and the
installed fonts.
* egui: `Context::set_missing_glyph_policy` / `missing_glyph_policy`.
* egui_kittest: **panics on a missing glyph by default**, since tofu in
a snapshot is easy to miss. Opt out with
`HarnessBuilder::allow_missing_glyphs()`. One demo test needed it (the
emoji completion popup lists emoji the bundled fonts lack).
Top: with fonts, U+10FFFD drawn with Ubuntu's `.notdef`. Bottom: the
same UI with `FontDefinitions::empty()`, all synthetic tofu (3× zoom):
<picture>
<img
src="https://static.rerun.io/tofu_cmp/1c2a567a1f53c301897e716452974a0b6fbc8e12/full.png"
alt="">
<source media="(max-width: 480px)"
srcset="https://static.rerun.io/tofu_cmp/1c2a567a1f53c301897e716452974a0b6fbc8e12/480w.png">
<source media="(max-width: 768px)"
srcset="https://static.rerun.io/tofu_cmp/1c2a567a1f53c301897e716452974a0b6fbc8e12/768w.png">
</picture>
Written by Claude (LLM) together with @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
`Context::add_glyph_rasterizer` appended a rasterizer and requested a
repaint on every call. Calling it from a setup path that runs each frame
piled up duplicates and kept the UI repainting forever (we hit this in
rerun's tests, where `apply_style_and_install_loaders` runs every frame
and the harness never settled).
* `GlyphRasterizer::new` now takes a mandatory `key`: adding a
rasterizer whose key is already installed is a no-op.
* `Context`/`Fonts`/`FontsImpl::add_glyph_rasterizer` only reload fonts,
clear caches and request a repaint when something actually changed.
`Fonts::add_glyph_rasterizer` returns whether it did.
* `SvgGlyph::into_rasterizer` is keyed by cluster, the web canvas
rasterizer by a fixed name.
Written by an LLM (Claude) together with @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* Stacked on #8581
**⚠️ Breaking ⚠️**
`egui_kittest` that every input widget (button, checkbox, slider, combo
box, text field, …) has an accessible name.
Opt out with `HarnessBuilder::with_accessibility_check(false)`, or run
it by hand with `Harness::check_accessibility`.
Running it over egui's own tests found real gaps, fixed here:
* An empty label (`checkbox(&mut b, "")`) took precedence over
`labelled_by`; now it is not set at all.
* `DragValue` is named after its prefix or suffix (it used to clear the
name).
* The color button has a name, with the color as its value.
* `TextEdit` lost its placeholder on frames where the selection changed.
* `Margin`, `CornerRadius` and the font-size slider name their inputs.
* The demos and kittest tests name their remaining inputs.
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
`WidgetRect::parent_id` used `Ui::id`, the stable id _scope_ shared by
sibling `Ui`s, while accesskit and `WidgetRect::id` use the per-`Ui`
`unique_id`. The `warn_if_rect_changes_id` debug check relies on
`parent_id` changing during a cascading id shift, but cascades propagate
through `unique_id`, not the scope id. So a parent's auto-id shifting
produced a false positive for every widget inside it.
Now `parent_id` is the parent's `unique_id`. Adds a regression test.
Known limitation: the child `Ui`'s own `WidgetRect` still warns in that
case, since its parent's id is genuinely unchanged. The heuristic cannot
tell that apart from a bug.
Found while working on:
* https://github.com/emilk/egui/pull/8542
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* [x] I have followed the instructions in the PR template
Adds `WidgetText::concat(style, parts)`, which joins several `RichText`s
into a single `WidgetText` (backed by a `LayoutJob`).
This is the easy way to get e.g. a label that is partly bold, or a label
with a small colored badge at the end, without manually building a
`LayoutJob` with `RichText::append_to`.
```rust
ui.label(WidgetText::concat(ui.style(), [
RichText::new("Normal, "),
RichText::new("strong, ").strong(),
RichText::new("and small").small(),
]));
```
Extracted from Rerun's `re_ui::egui_ext`.
Written by Claude (LLM).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
A DragValue cannot be held to a width while it is text-edited: the
TextEdit it builds for that state hardcodes clip_text(false), so the
widget grows to fit whatever has been typed and carries its layout with
it. A long entry can stretch a containing popup off-screen. range() does
not help, since it only applies once the edit commits.
clip_text(true) forwards to that TextEdit, so the widget keeps its width
and the text scrolls inside it, following the cursor. Defaults to false,
leaving existing behavior unchanged.
Example on egui.rs:
<img width="1418" height="696" alt="20260917-1900-19 6437910"
src="https://github.com/user-attachments/assets/4bc102ad-24e9-43ae-9e81-91c17a2c2c91"
/>
* Small fix; no corresponding issue created
* [X] I have followed the instructions in the PR template
Found while making the Rerun viewer navigable by accessible name:
floating containers were anonymous `Unknown`/`GenericContainer` nodes at
the root of the tree, and icon-only buttons with a tooltip had no name.
* `Ui`s get an accesskit role from their `UiKind`: panels are `Pane`,
modals and popups `Dialog`, menus `Menu`, tooltips `Tooltip`.
* Popups and tooltips hang under the widget that opened them
(`Area::accessibility_parent`, set through `Popup::anchor_widget`)
instead of floating at the root.
* Combo box popups are `ListBox`.
* `on_hover_text` sets the widget's accessible description, and its name
if it has none.
Drafted with Claude Code (an LLM), tests included.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Each `use foo::*` at the crate root is now spelled out, so it is obvious
what `egui` re-exports and where each name comes from.
In particular, `cargo doc -p egui` will now show all exported items
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Four `Context` methods dropped the font cache immediately:
```rust
pub fn add_glyph_rasterizer(&self, glyph_rasterizer: GlyphRasterizer) {
self.write(|ctx| {
ctx.glyph_rasterizers.push(glyph_rasterizer);
ctx.fonts = None; // ← even if we are mid-pass
});
}
```
Call any of them from inside a pass and the next text layout panics with
`No fonts available until first call to Context::run()`, or the
tessellator hits `.expect("No fonts loaded")`.
They now set a `reload_fonts` flag that `update_fonts_mut` acts on at
the start of the next pass, which is what `set_fonts` and `add_font`
already do, and each requests a repaint so the change still shows up
promptly.
Found in [Rerun](https://github.com/rerun-io/rerun): our style setup
calls `add_glyph_rasterizer` to draw a couple of glyphs from our own SVG
icons, and every `egui_kittest` test calls that setup inside its
`build_ui` closure. 592 tests on Linux and 590 on macOS died on those
two panics.
The new test fails on `main` with exactly that message and passes here.
* [x] I have followed the instructions in the PR template
Disclosure: this PR was written by Claude (an LLM).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
`update_accesskit_for_text_widget` unconditionally called
`builder.set_role`, so the selectable-label pass overwrote the role a
widget had already reported through its `WidgetInfo`. A `Link` came out
as `Role::Label`, indistinguishable from static text to a screen reader.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
We want to be explicit when constructing `Id`s as `Id::unique`. `AsId`
was the old implicit way. For implicit parameters, use `impl AsIdSalt`
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Closes#2744.
Adds `RangeSlider`: two handles selecting a sub-range, an editable value
at each end, and the accent fill between them.
Three commits:
**1. Move `Slider`'s geometry, painting and interaction into a private
`slider_core`.** No new `Visuals` field. The one rendering change: the
trailing fill is clamped to the rail, which moves it by under a pixel
for narrow rect handles.
**2. Add `RangeSlider` on top of it.** Rail, handles, hover growth,
`HandleShape` and the fill are the same code `Slider` runs, so the two
do not look different.
** 3. Added per-handle keyboard and screen-reader support. Each handle
is its own focus stop, so Tab reaches either end and the arrow keys move
the focused one. Each handle reports itself to AccessKit bounded by its
neighbour rather than by the end of the rail.
A separate widget rather than a mode on `Slider`, because none of this
means anything with one handle:
- the grabbed handle is remembered for the whole drag, so dragging one
handle past the other does not hand the pointer to its neighbour
- when the handles coincide, the side the pointer is on decides which
one moves
- `min_separation` sets how close they may come
One change: `paint_fill` takes a `Rangef` instead of a handle centre.
API changes from the review follow-ups:
- `Slider::prefix`/`suffix` take `impl IntoAtoms`, like `DragValue`, so
images and styled text work. Plain `char` or number arguments no longer
do.
- A prefix goes in front of any prefix already set, and a suffix after
any suffix already set, on `DragValue`, `Slider`, `RangeSlider`, and
`TextEdit`. `Slider` and `TextEdit` used to replace.
- `ValueFormat`, `SliderSpec`, and `DragValueSettings` are public, with
`format()`, `spec()`, and `drag_value()` builders on both sliders.
- `DragValue::atoms()` returns `Atoms` by value.
Snapshots: the new gallery row changes `widget_gallery_*` and
`demos/Scene` (the Scene demo embeds a Widget Gallery). `RangeSlider` is
also added to `test_widgets.rs`, which adds two new snapshots.
Written with Claude (llm), I (gavrelina) have reviewed the code myself
(I did!).
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Remove `default_fonts` from the list of default features of `egui` and
`epaint`, but keep it for `eframe`.
This is so that 3rd party egui crates don't accidentally force the
`default_fonts` feature on all upstream users.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
`with_salt_matches_with` and `with_one_child` built the same `Id` by
different routes.
The debug source map keeps the first spelling it sees for an `Id` and
ignores later ones, so whichever test ran first decided what the other
one's `{:?}` printed — and the test order is not fixed.
Giving `with_salt_matches_with` sources of its own removes the shared
entry.
Surfaced by the red `Run tests` on #8571, which does not touch `id.rs`.
It reproduces on `main`: running just the two tests together, 10 of 15
runs failed before this change, and 12 runs of the whole module after it
failed none.
🤖 This PR was opened by a coding agent (Claude Opus 5).
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
An inspection request is served from a frame, and a minimized or
occluded window runs none: eframe skips the whole pass, and wgpu hands
out no surface texture. An inspector attached to a backgrounded app
could only time out.
* `ViewportCommand::RequestPaintWhileHidden` asks for a painted frame
from a hidden window. It rides the command channel, which already
reaches the integration while hidden (`run_logic` hands it the pending
commands), so `Context` needs nothing new.
* eframe paints when a pending action wants paint: that command, or a
screenshot, which asks for the same thing.
* egui-wgpu captures without a surface texture: the capture renders to
its own texture anyway, and only the present needs the surface. Pending
screenshot callbacks used to be dropped silently whenever the frame
could not be acquired, which also hit visible-but-occluded windows.
`egui_inspection` sends the command, so nothing raises or focuses the
window.
Repro and manual test: `cargo run -p test_inspection_hidden_window`.
Verified on macOS: screenshots and trees are served while the window is
minimized.
Replaces:
* https://github.com/emilk/egui/pull/8566
* [x] I have followed the instructions in the PR template
Written by Claude (LLM).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
`Ui::id` was easy to confuse with `Ui::unique_id`. It is the id of the
_scope_ the `Ui` belongs to: stable across frames, shared by sibling
`Ui`s, and the base for widget state ids. `Ui::unique_id` is unique per
`Ui` but unstable.
This renames `Ui::id` to `Ui::scope_id` (old name deprecated) and
rewrites both docstrings to say so.
Follow-up to discussion in:
* https://github.com/emilk/egui/pull/8534#discussion_r3969041538
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Adds a setting on wheter the cursor should be rendered or not.
Fixes the recording feature potentially rendering frames of the same
pass multiple times, which is unexpected during normal (non-test)
execution and might cause crashes in custom rendering callbacks.
* Closes <https://github.com/emilk/egui/issues/8415>
* [x] I have followed the instructions in the PR template
Adds `Context::root_ui` to access the root `Ui` of the current pass from
anywhere, and `Context::run_pass` (like `run_ui`, but the callback gets
`&Context`). The root `Ui` is stored in the viewport state during the
pass and created on demand, so `root_ui` also works with
`begin_pass`/`end_pass`.
This lets integrations like `bevy_egui`, where ui code is spread over
many systems sharing only a `Context`, add panels again:
```rust
ctx.root_ui(|ui| {
egui::Panel::left("left").show(ui, |ui| { /* … */ });
});
```
Panels added this way share one root `Ui`, so they stack correctly and
`Context::is_pointer_over_egui` stays correct. Calling `root_ui` while
the root `Ui` is already borrowed (e.g. inside the `run_ui` callback)
panics with a clear message.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
`AtomLayout` kinda combined two seperate concerns, this logically
seperates them.
Also makes nested atoms a lot more lightweight, not requiring a
`Response`.
New widget `egui::CompletionPopup`: a code completion popup over a
`TextEdit`. ↑/↓ selects, Enter or Tab accepts, Escape closes, click
accepts. Keyboard focus never leaves the text field. The caller supplies
suggestions for the word under the cursor:
```rust
CompletionPopup::new(id).show(ui, TextEdit::singleline(&mut text), |query| suggest(query));
```
New example `code_completion` shows slash-command completion, with
headless `egui_kittest` tests for the arrow/Enter/Tab/Escape behavior,
including a multiline chat composer.
Builds on:
* https://github.com/emilk/egui/pull/8530
Note on Escape: egui surrenders focus on Escape in `Memory::begin_pass`,
before any widget runs. So an app that wants "Escape does X while the
text field is focused" must set `TextEdit::event_filter(EventFilter {
escape: true, .. })`, or the handler never sees the field focused. The
popup does this for you while it is open.

* Related: <https://github.com/emilk/egui/issues/122>
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
`GlyphRasterizer` now has a `FontPriority`:
* `FontPriority::Highest`: asked about every cluster, before any font.
Use it to override how specific glyphs looks
* `FontPriority::Lowest` (default): a fallback, only asked about
clusters no installed font (or `FontProvider`) has. Same as before.
Several rasterizers can be installed; within a tier they are asked in
order, and the first `Some` wins.
```rust
ctx.add_glyph_rasterizer(
egui::GlyphRasterizer::new(|request| (request.cluster == "…").then(|| my_ellipsis(request)))
.with_priority(egui::FontPriority::Highest),
);
```
API changes (all unreleased): `Context::set_glyph_rasterizer(Option)` →
`add_glyph_rasterizer` / `set_glyph_rasterizers(Vec)`, same on
`epaint::Fonts`.
Follow-up to:
* https://github.com/emilk/egui/pull/8512
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* [x] I have followed the instructions in the PR template
The response of a container (e.g. from `Ui::response` or
`ui.scope(…).response`) is not `hovered()` or `clicked()` when a child
widget is under the pointer, since the child covers the container.
This adds methods that treat the container and its children as one:
* `Response::container_contains_pointer`
* `Response::container_hovered`
* `Response::container_clicked`
* `Response::container_secondary_clicked`
* `Response::container_context_menu`
Useful for e.g. highlighting a table row that holds buttons, or showing
a context menu for a whole row.
Extracted from Rerun's `re_ui::egui_ext`, where it has been in use for a
while.
Written by Claude (LLM).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Eguis built in widgets should work right even if there are no
default/system fonts. This renders the submenubutton triangle with
epaint so it will always look right and isn't system-font dependent.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>