Skip to content

Conversation

elastic-renovate-prod[bot]
Copy link

@elastic-renovate-prod elastic-renovate-prod bot commented Jun 6, 2025

This PR contains the following updates:

Package Type Update Change
egui_extras dependencies minor 0.29.1 -> 0.33.0

Release Notes

emilk/egui (egui_extras)

v0.33.0

Compare Source

Highlights from this release:

  • egui::Plugin a improved way to create and access egui plugins
  • kitdiff, a viewer for egui_kittest image snapshots (and a general image diff tool)
  • better kerning
Improved kerning

As a step towards using parley for font rendering, @​valadaptive has refactored the font loading and rendering code. A result of this (next to the font rendering code being much nicer now) is improved kerning.
Notice how the c moved away from the k:

Oct-09-2025 16-21-58

egui::Plugin trait

We've added a new trait-based plugin api, meant to replace Context::on_begin_pass and Context::on_end_pass.
This makes it a lot easier to handle state in your plugins. Instead of having to write to egui memory it can live right on your plugin struct.
The trait based api also makes easier to add new hooks that plugins can use. In addition to on_begin_pass and on_end_pass, the Plugin trait now has a input_hook and output_hook which you can use to inspect / modify the RawInput / FullOutput.

kitdiff, a image diff viewer

At rerun we have a ton of snapshots. Some PRs will change most of them (e.g. the one that updated egui and introduced the kerning improvements, ~500 snapshots changed!).
If you really want to look at every changed snapshot it better be as efficient as possible, and the experience on github, fiddeling with the sliders, is kind of frustrating.
In order to fix this, we've made kitdiff.
You can use it locally via

  • kitdiff files . will search for .new.png and .diff.png files
  • kitdiff git will compare the current files to the default branch (main/master)
    Or in the browser via
  • going to https://rerun-io.github.io/kitdiff/ and pasting a PR or github artifact url
  • linking to kitdiff via e.g. a github workflow https://rerun-io.github.io/kitdiff/?url=<link_to_pr_or_artifact>

To install kitdiff run cargo install --git https://github.com/rerun-io/kitdiff

Here is a video showing the kerning changes in kitdiff (try it yourself):

Screen.Recording.2025-10-09.at.13.43.19.mp4
Migration guide
  • egui::Mutex now has a timeout as a simple deadlock detection
    • If you use a egui::Mutex in some place where it's held for longer than a single frame, you should switch to the std mutex or parking_lot instead (egui mutexes are wrappers around parking lot)
  • screen_rect is deprecated
    • In order to support safe areas, egui now has viewport_rect and content_rect.
    • Update all usages of screen_rect to content_rect, unless you are sure that you want to draw outside the safe area (which would mean your Ui may be covered by notches, system ui, etc.)
⭐ Added
🔧 Changed
🔥 Removed
🐛 Fixed

v0.32.3

Compare Source

v0.32.2

Compare Source

v0.32.1

Compare Source

⭐ Added
🐛 Fixed

v0.32.0

Compare Source

This is a big egui release, with several exciting new features!

  • Atoms are new layout primitives in egui, for text and images
  • Popups, tooltips and menus have undergone a complete rewrite
  • Much improved SVG support
  • Crisper graphics (especially text!)

Let's dive in!

⚛️ Atoms

egui::Atom is the new, indivisible building blocks of egui (hence their name).
An Atom is an enum that can be either WidgetText, Image, or Custom.

The new AtomLayout can be used within widgets to do basic layout.
The initial implementation is as minimal as possible, doing just enough to implement what Button could do before.
There is a new IntoAtoms trait that works with tuples of Atoms. Each atom can be customized with the AtomExt trait
which works on everything that implements Into<Atom>, so e.g. RichText or Image.
So to create a Button with text and image you can now do:

let image = include_image!("my_icon.png").atom_size(Vec2::splat(12.0));
ui.button((image, "Click me!"));

Anywhere you see impl IntoAtoms you can add any number of images and text, in any order.

As of 0.32, we have ported the Button, Checkbox, RadioButton to use atoms
(meaning they support adding Atoms and are built on top of AtomLayout).
The Button implementation is not only more powerful now, but also much simpler, removing ~130 lines of layout math.

In combination with ui.read_response, custom widgets are really simple now, here is a minimal button implementation:

pub struct ALButton<'a> {
    al: AtomLayout<'a>,
}

impl<'a> ALButton<'a> {
    pub fn new(content: impl IntoAtoms<'a>) -> Self {
        Self {
            al: AtomLayout::new(content.into_atoms()).sense(Sense::click()),
        }
    }
}

impl<'a> Widget for ALButton<'a> {
    fn ui(mut self, ui: &mut Ui) -> Response {
        let Self { al } = self;
        let response = ui.ctx().read_response(ui.next_auto_id());

        let visuals = response.map_or(&ui.style().visuals.widgets.inactive, |response| {
            ui.style().interact(&response)
        });

        let al = al.frame(
            Frame::new()
                .inner_margin(ui.style().spacing.button_padding)
                .fill(visuals.bg_fill)
                .stroke(visuals.bg_stroke)
                .corner_radius(visuals.corner_radius),
        );

        al.show(ui).response
    }
}

You can even use Atom::custom to add custom content to Widgets. Here is a button in a button:

Screen.Recording.2025-07-10.at.13.10.52.mov
let custom_button_id = Id::new("custom_button");
let response = Button::new((
    Atom::custom(custom_button_id, Vec2::splat(18.0)),
    "Look at my mini button!",
))
.atom_ui(ui);
if let Some(rect) = response.rect(custom_button_id) {
    ui.put(rect, Button::new("🔎").frame_when_inactive(false));
}

Currently, you need to use atom_ui to get a AtomResponse which will have the Rect to use, but in the future
this could be streamlined, e.g. by adding a AtomKind::Callback or by passing the Rects back with egui::Response.

Basing our widgets on AtomLayout also allowed us to improve Response::intrinsic_size, which will now report the
correct size even if widgets are truncated. intrinsic_size is the size that a non-wrapped, non-truncated,
non-justified version of the widget would have, and can be useful in advanced layout
calculations like egui_flex.

Details
❕ Improved popups, tooltips, and menus

Introduces a new egui::Popup api. Checkout the new demo on https://egui.rs:

Screen.Recording.2025-07-10.at.11.47.22.mov

We introduced a new RectAlign helper to align a rect relative to an other rect. The Popup will by default try to find the best RectAlign based on the source widgets position (previously submenus would annoyingly overlap if at the edge of the window):

Screen.Recording.2025-07-10.at.11.36.29.mov

Tooltip and menu have been rewritten based on the new Popup api. They are now compatible with each other, meaning you can just show a ui.menu_button() in any Popup to get a sub menu. There are now customizable MenuButton and SubMenuButton structs, to help with customizing your menu buttons. This means menus now also support PopupCloseBehavior so you can remove your close_menu calls from your click handlers!

The old tooltip and popup apis have been ported to the new api so there should be very little breaking changes. The old menu is still around but deprecated. ui.menu_button etc now open the new menu, if you can't update to the new one immediately you can use the old buttons from the deprecated egui::menu menu.

We also introduced ui.close() which closes the nearest container. So you can now conveniently close Windows, Collapsibles, Modals and Popups from within. To use this for your own containers, call UiBuilder::closable and then check for closing within that ui via ui.should_close().

Details
▲ Improved SVG support

You can render SVG in egui with

ui.add(egui::Image::new(egui::include_image!("icon.svg"));

(Requires the use of egui_extras, with the svg feature enabled and a call to install_image_loaders).

Previously this would sometimes result in a blurry SVG, epecially if the Image was set to be dynamically scale based on the size of the Ui that contained it. Now SVG:s are always pixel-perfect, for truly scalable graphics.

svg-scaling

Details
✨ Crisper graphics

Non-SVG icons are also rendered better, and text sharpness has been improved, especially in light mode.

image

Details
Migration guide

We have some silently breaking changes (code compiles fine but behavior changed) that require special care:

Menus close on click by default
  • previously menus would only close on click outside
  • either
    • remove the ui.close_menu() calls from button click handlers since they are obsolete
    • if the menu should stay open on clicks, change the PopupCloseBehavior:
          // Change this
        ui.menu_button("Text", |ui| { /* Menu Content */ });
          // To this:
        MenuButton::new("Text").config(
            MenuConfig::default().close_behavior(PopupCloseBehavior::CloseOnClickOutside),
        ).ui(ui, |ui| { /* Menu Content */ });
      You can also change the behavior only for a single SubMenu by using SubMenuButton, but by default it should be passed to any submenus when using MenuButton.
Memory::is_popup_open api now requires calls to Memory::keep_popup_open
  • The popup will immediately close if keep_popup_open is not called.
  • It's recommended to use the new Popup api which handles this for you.
  • If you can't switch to the new api for some reason, update the code to call keep_popup_open:
        if ui.memory(|mem| mem.is_popup_open(popup_id)) {
          ui.memory_mut(|mem| mem.keep_popup_open(popup_id)); // <- add this line
          let area_response = Area::new(popup_id).show(...)
        }
⭐ Other improvements
🔧 Changed
🔥 Removed
🐛 Fixed
🚀 Performance

v0.31.1

Compare Source

v0.31.0

Compare Source

Highlights ✨
Scene container

This release adds the Scene container to egui. It is a pannable, zoomable canvas that can contain Widgets and child Uis.
This will make it easier to e.g. implement a graph editor.

scene

Clearer, pixel perfect rendering

The tessellator has been updated for improved rendering quality and better performance. It will produce fewer vertices
and shapes will have less overdraw. We've also defined what CornerRadius (previously Rounding) means.

We've also added a tessellator test to the demo app, where you can play around with different
values to see what's produced:

tessellator-test.mp4

Check the PR for more details.

CornerRadius, Margin, Shadow size reduction

In order to pave the path for more complex and customizable styling solutions, we've reduced the size of
CornerRadius, Margin and Shadow values to i8 and u8.

Migration guide
  • Add a StrokeKind to all your Painter::rect calls #​5648
  • StrokeKind::default was removed, since the 'normal' value depends on the context #​5658
    • You probably want to use StrokeKind::Inside when drawing rectangles
    • You probably want to use StrokeKind::Middle when drawing open paths
  • Rename Rounding to CornerRadius #​5673
  • CornerRadius, Margin and Shadow have been updated to use i8 and u8 #​5563, #​5567, #​5568
    • Remove the .0 from your values
    • Cast dynamic values with as i8 / as u8 or as _ if you want Rust to infer the type
      • Rust will do a 'saturating' cast, so if your f32 value is bigger than 127 it will be clamped to 127
  • RectShape parameters changed #​5565
    • Prefer to use the builder methods to create it instead of initializing it directly
  • Frame now takes the Stroke width into account for its sizing, so check all views of your app to make sure they still look right.
    Read the PR for more info.
⭐ Added
🔧 Changed
🔥 Removed
🐛 Fixed
🚀 Performance

v0.30.0

Compare Source

✨ Highlights
egui_kittest

This release welcomes a new crate to the family: egui_kittest.
egui_kittest is a testing framework for egui, allowing you to test both automation (simulated clicks and other events),
and also do screenshot testing (useful for regression tests).
egui_kittest is built using kittest, which is a general GUI testing framework that aims to work with any Rust GUI (not just egui!).
kittest uses the accessibility library AccessKit for automatation and to query the widget tree.

kittest and egui_kittest are written by @​lucasmerlin.

Here's a quick example of how to use egui_kittest to test a checkbox:

use egui::accesskit::Toggled;
use egui_kittest::{Harness, kittest::Queryable};

fn main() {
    let mut checked = false;
    let app = |ui: &mut egui::Ui| {
        ui.checkbox(&mut checked, "Check me!");
    };

    let mut harness = egui_kittest::Harness::new_ui(app);

    let checkbox = harness.get_by_label("Check me!");
    assert_eq!(checkbox.toggled(), Some(Toggled::False));
    checkbox.click();

    harness.run();

    let checkbox = harness.get_by_label("Check me!");
    assert_eq!(checkbox.toggled(), Some(Toggled::True));

    // You can even render the ui and do image snapshot tests
    #[cfg(all(feature = "wgpu", feature = "snapshot"))]
    harness.wgpu_snapshot("readme_example");
}
⭐ Added
🔧 Changed
🐛 Fixed

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@elastic-renovate-prod
Copy link
Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path Cargo.toml --workspace
    Updating crates.io index
error: failed to get `symblib` as a dependency of package `devfiler v0.14.0 (/tmp/renovate/repos/github/elastic/devfiler)`

Caused by:
  failed to load source for dependency `symblib`

Caused by:
  Unable to update /tmp/renovate/repos/github/elastic/devfiler/opentelemetry-ebpf-profiler/rust-crates/symblib

Caused by:
  failed to read `/tmp/renovate/repos/github/elastic/devfiler/opentelemetry-ebpf-profiler/rust-crates/symblib/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

@elastic-renovate-prod elastic-renovate-prod bot requested a review from a team as a code owner June 6, 2025 05:41
@elastic-renovate-prod elastic-renovate-prod bot force-pushed the renovate/egui_extras-0.x branch from 5795a7b to a018fa5 Compare June 23, 2025 13:22
@elastic-renovate-prod elastic-renovate-prod bot changed the title Update Rust crate egui_extras to 0.31.0 fix(deps): update rust crate egui_extras to 0.31.0 Jun 23, 2025
@elastic-renovate-prod elastic-renovate-prod bot force-pushed the renovate/egui_extras-0.x branch from a018fa5 to da87b5f Compare July 12, 2025 03:57
@elastic-renovate-prod elastic-renovate-prod bot changed the title fix(deps): update rust crate egui_extras to 0.31.0 fix(deps): update rust crate egui_extras to 0.32.0 Jul 12, 2025
@elastic-renovate-prod elastic-renovate-prod bot force-pushed the renovate/egui_extras-0.x branch from da87b5f to 8f117ae Compare August 4, 2025 06:46
@elastic-renovate-prod elastic-renovate-prod bot force-pushed the renovate/egui_extras-0.x branch from 8f117ae to aa76e50 Compare October 10, 2025 06:26
@elastic-renovate-prod elastic-renovate-prod bot changed the title fix(deps): update rust crate egui_extras to 0.32.0 fix(deps): update rust crate egui_extras to 0.33.0 Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants