Update Rust crate egui to 0.33.2 #378
Reference in New Issue
Block a user
Delete Branch "renovate/egui-0.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.32.3->0.33.2Release Notes
emilk/egui (egui)
v0.33.2Compare Source
⭐ Added
Plugin::on_widget_under_pointerto support widget inspector #7652 by @juancampaResponse::total_drag_deltaandPointerState::total_drag_delta#7708 by @emilk🔧 Changed
ComboBox#7658 by @lucasmerlin🐛 Fixed
profiling::scopecompile error when profiling usingtracingbackend #7646 by @PPakalnsui.response().interact(Sense::click())being flakey #7713 by @lucasmerlinv0.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):
https://github.com/user-attachments/assets/74640af1-09ba-435a-9d0c-2cbeee140c8f
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 - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
⚠️ 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:
The artifact failure details are included below:
File name: custom_consumption/Cargo.lock