⬆️🦀 Update Rust crate egui to 0.33.0 #242
Open
+271
−103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.32.0->0.33.0Release Notes
emilk/egui (egui)
v0.33.0Compare Source
Highlights from this release:
egui::Plugina improved way to create and access egui pluginsImproved 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:
egui::PlugintraitWe've added a new trait-based plugin api, meant to replace
Context::on_begin_passandContext::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_passandon_end_pass, thePlugintrait now has ainput_hookandoutput_hookwhich you can use to inspect / modify theRawInput/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 fileskitdiff gitwill compare the current files to the default branch (main/master)Or in the browser via
https://rerun-io.github.io/kitdiff/?url=<link_to_pr_or_artifact>To install kitdiff run
cargo install --git https://github.com/rerun-io/kitdiffHere 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::Mutexnow has a timeout as a simple deadlock detectionegui::Mutexin 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_rectis deprecatedviewport_rectandcontent_rect.screen_recttocontent_rect, unless you are sure that you want to draw outside thesafe area(which would mean your Ui may be covered by notches, system ui, etc.)⭐ Added
Ui::take_available_space()helper function, which sets the Ui's minimum size to the available space #7573 by @IsseWUiBuilder::global_scopeandUiBuilder::id#7372 by @Icekeyemath::fast_midpoint#7435 by @emilkhex_colormacroconst#7444 by @YgorSouzaSurrenderFocusOnoption #7471 by @lucasmerlinMemory::move_focus#7476 by @darkwater🔧 Changed
viewport::WindowLeveland dependents #7432 by @lkdmImageButtonand removedWidgetType::ImageButton#7483 by @Stelios-KourlisUi#7386 by @lucasmerlin🔥 Removed
deadlock_detectionfeature #7497 by @lucasmerlinPlatformOutput#7523 by @emilklogfeature #7583 by @emilk🐛 Fixed
clippy::iter_over_hash_typelint #7421 by @emilkConfiguration
📅 Schedule: Branch creation - "every weekend" (UTC), 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.
This PR was generated by Mend Renovate. View the repository job log.