fix(deps): update rust crate egui_extras to 0.33.0 #13
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.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 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::Plugin
traitWe've added a new trait-based plugin api, meant to replace
Context::on_begin_pass
andContext::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
andon_end_pass
, thePlugin
trait now has ainput_hook
andoutput_hook
which 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 git
will 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/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 detectionegui::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 deprecatedviewport_rect
andcontent_rect
.screen_rect
tocontent_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_scope
andUiBuilder::id
#7372 by @Icekeyemath::fast_midpoint
#7435 by @emilkhex_color
macroconst
#7444 by @YgorSouzaSurrenderFocusOn
option #7471 by @lucasmerlinMemory::move_focus
#7476 by @darkwater🔧 Changed
viewport::WindowLevel
and dependents #7432 by @lkdmImageButton
and removedWidgetType::ImageButton
#7483 by @Stelios-KourlisUi
#7386 by @lucasmerlin🔥 Removed
deadlock_detection
feature #7497 by @lucasmerlinPlatformOutput
#7523 by @emilklog
feature #7583 by @emilk🐛 Fixed
clippy::iter_over_hash_type
lint #7421 by @emilkv0.32.3
Compare Source
TextEdit
's in RTL layouts #5547 by @zakarumychv0.32.2
Compare Source
SubMenu
should not display when ui is disabled #7428 by @ozwaldorfUi::place
, to place widgets without changing the cursor #7359 by @lucasmerlinv0.32.1
Compare Source
⭐ Added
ComboBox::popup_style
#7360 by @lucasmerlin🐛 Fixed
Popup
not closing #7383 by @lucasmerlinWidgetText::Text
ignoring fallback font and overrides #7361 by @lucasmerlinoverride_text_color
priority #7439 by @YgorSouzav0.32.0
Compare Source
This is a big egui release, with several exciting new features!
Let's dive in!
⚛️ Atoms
egui::Atom
is the new, indivisible building blocks of egui (hence their name).An
Atom
is anenum
that can be eitherWidgetText
,Image
, orCustom
.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 ofAtom
s. Each atom can be customized with theAtomExt
traitwhich works on everything that implements
Into<Atom>
, so e.g.RichText
orImage
.So to create a
Button
with text and image you can now do: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: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
Currently, you need to use
atom_ui
to get aAtomResponse
which will have theRect
to use, but in the futurethis could be streamlined, e.g. by adding a
AtomKind::Callback
or by passing the Rects back withegui::Response
.Basing our widgets on
AtomLayout
also allowed us to improveResponse::intrinsic_size
, which will now report thecorrect 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
AtomLayout
, abstracting layouting within widgets #5830 by @lucasmerlinGalley::intrinsic_size
and use it inAtomLayout
#7146 by @lucasmerlin❕ 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. ThePopup
will by default try to find the bestRectAlign
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
andmenu
have been rewritten based on the newPopup
api. They are now compatible with each other, meaning you can just show aui.menu_button()
in anyPopup
to get a sub menu. There are now customizableMenuButton
andSubMenuButton
structs, to help with customizing your menu buttons. This means menus now also supportPopupCloseBehavior
so you can remove yourclose_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 deprecatedegui::menu
menu.We also introduced
ui.close()
which closes the nearest container. So you can now conveniently closeWindow
s,Collapsible
s,Modal
s andPopup
s from within. To use this for your own containers, callUiBuilder::closable
and then check for closing within that ui viaui.should_close()
.Details
Popup
andTooltip
, unifying the previous behaviours #5713 by @lucasmerlinUi::close
andResponse::should_close
#5729 by @lucasmerlinegui::Popup
#5716 by @lucasmerlinPopup
API for the color picker button #7137 by @lucasmerlinMemory::keep_popup_open
isn't called #5814 by @juancampaMemory::popup
API in favor of newPopup
API #7317 by @emilk▲ Improved SVG support
You can render SVG in egui with
(Requires the use of
egui_extras
, with thesvg
feature enabled and a call toinstall_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 theUi
that contained it. Now SVG:s are always pixel-perfect, for truly scalable graphics.Details
Image::paint_at
pixel-perfect crisp for SVG images #7078 by @emilk✨ Crisper graphics
Non-SVG icons are also rendered better, and text sharpness has been improved, especially in light mode.
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
ui.close_menu()
calls from button click handlers since they are obsoletePopupCloseBehavior
:SubMenuButton
, but by default it should be passed to any submenus when usingMenuButton
.Memory::is_popup_open
api now requires calls toMemory::keep_popup_open
keep_popup_open
is not called.Popup
api which handles this for you.keep_popup_open
:⭐ Other improvements
Label::show_tooltip_when_elided
#5710 by @brycebergerUi::allocate_new_ui
in favor ofUi::scope_builder
#5764 by @lucasmerlinexpand_bg
to customize size of text background #5365 by @MeGaGiGaGonTextBuffer
forlayouter
inTextEdit
instead of&str
#5712 by @kernelkindSlider::update_while_editing(bool)
API #5978 by @mbernatScene::drag_pan_buttons
option. Allows specifying which pointer buttons pan the scene by dragging #5892 by @mitchmindtreeScene::sense
to customize howScene
responds to user input #5893 by @mitchmindtreeTextEdit
arrow navigation to handle Unicode graphemes #5812 by @MStarhaScrollArea
improvements for user configurability #5443 by @MStarhaResponse::clicked_with_open_in_background
#7093 by @emilkModifiers::matches_any
#7123 by @emilkContext::format_modifiers
#7125 by @emilkOperatingSystem::is_mac
#7122 by @emilkContext::current_pass_index
#7276 by @emilkContext::cumulative_frame_nr
#7278 by @emilkVisuals::text_edit_bg_color
#7283 by @emilkVisuals::weak_text_alpha
andweak_text_color
#7285 by @emilkegui::Sides
shrink_left
/shrink_right
#7295 by @lucasmerlin🔧 Changed
hint_text
inWidgetInfo
#5724 by @bircniDefault
forThemePreference
#5702 by @MichaelGruppavailable_rect
docs with the new reality after #4590 #5701 by @podusowskiViewport
positioning #5715 by @aspiringLichSizeHint
#7079 by @emilkInputOptions
#7121 by @emilkButton
inherits thealt_text
of theImage
in it, if any #7136 by @emilkTooltip
slightly #7151 by @emilkui.disable()
to modify opacity #7282 by @emilkBitOr
andBitOrAssign
forRect
#7319 by @lucasmerlin🔥 Removed
SelectableLabel
#7277 by @lucasmerlin🐛 Fixed
Scene
: makescene_rect
full size on reset #5801 by @graydenshandScene
:TextEdit
selection when placed in aScene
#5791 by @karhuScene
: Set transform layer before calling user content #5884 by @mitchmindtreeTextShape
underline width #5865 by @emilkconsume_key
#7134 by @lucasmerlinemoji-icon-font
with fix for fullwidth latin characters #7067 by @emilkScrollArea
#5286 by @gilbertoalexsantosResponse::clicked_elsewhere
not returningtrue
sometimes #5798 by @lucasmerlinDragValue
expansion when editing #5809 by @MStarhaDragValue
eating focus, causing focus to reset #5826 by @KonaeAkiraavailable_space
#6900 by @lucasmerlinleading_space
sometimes being ignored during paragraph splitting #7031 by @afishhhComboBox::from_id_source
#7055 by @aelmizebend_pass
is called for all loaders #7072 by @emilkdebug_assert
triggered bymenu
/intersect_ray
#7299 by @emilkRect::area
to return zero for negative rectangles #7305 by @emilk🚀 Performance
WidgetText
smaller and faster #6903 by @lucasmerlinv0.31.1
Compare Source
TextEdit::singleline
#5640 by @IaVashikv0.31.0
Compare Source
Highlights ✨
Scene container
This release adds the
Scene
container to egui. It is a pannable, zoomable canvas that can containWidget
s and childUi
s.This will make it easier to e.g. implement a graph editor.
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
(previouslyRounding
) 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 reductionIn order to pave the path for more complex and customizable styling solutions, we've reduced the size of
CornerRadius
,Margin
andShadow
values toi8
andu8
.Migration guide
StrokeKind
to all yourPainter::rect
calls #5648StrokeKind::default
was removed, since the 'normal' value depends on the context #5658StrokeKind::Inside
when drawing rectanglesStrokeKind::Middle
when drawing open pathsRounding
toCornerRadius
#5673CornerRadius
,Margin
andShadow
have been updated to usei8
andu8
#5563, #5567, #5568as i8
/as u8
oras _
if you want Rust to infer the typef32
value is bigger than127
it will be clamped to127
RectShape
parameters changed #5565Frame
now takes theStroke
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
egui::Scene
for panning/zooming aUi
#5505 by @grtlrOutputCommand
for copying text and opening URL:s #5532 by @emilkContext::copy_image
#5533 by @emilkWidgetType::Image
andImage::alt_text
#5534 by @lucasmerlinepaint::Brush
for controllingRectShape
texturing #5565 by @emilknohash_hasher::IsEnabled
forId
#5628 by @emilk!
,{
,}
#5548 by @Its-Just-NansRectShape::stroke_kind
to control if stroke is inside/outside/centered #5647 by @emilk🔧 Changed
Frame
now includes stroke width as part of padding #5575 by @emilkRounding
toCornerRadius
#5673 by @emilkStrokeKind
when painting rectangles with strokes #5648 by @emilk🔥 Removed
egui::special_emojis::TWITTER
#5622 by @emilkStrokeKind::default
#5658 by @emilk🐛 Fixed
profiling
crate #5494 by @lucasmerlinArea::compare_order()
#5569 by @HactarCE🚀 Performance
u8
inCornerRadius
, and introduceCornerRadiusF32
#5563 by @emilkMargin
usingi8
to reduce its size #5567 by @emilkShadow
by usingi8/u8
instead off32
#5568 by @emilkResponse
andSense
#5556 by @polwelv0.30.0
Compare Source
✨ Highlights
Modal
, a popup that blocks input to the rest of the application (#5358 by @lucasmerlin)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 usingkittest
, which is a general GUI testing framework that aims to work with any Rust GUI (not just egui!).kittest
uses the accessibility libraryAccessKit
for automatation and to query the widget tree.kittest
andegui_kittest
are written by @lucasmerlin.Here's a quick example of how to use
egui_kittest
to test a checkbox:⭐ Added
Modal
andMemory::set_modal_layer
#5358 by @lucasmerlinUiBuilder::layer_id
and removelayer_id
fromUi::new
#5195 by @emilkTextEdit
#5203 by @bircniResponse::intrinsic_size
forTextEdit
#5266 by @lucasmerlinMultiTouchInfo
#5247 by @lucasmerlinContext::add_font
#5228 by @frederik-uniBox<str>
forWidgetText
,RichText
#5309 by @dimtpapWindow::scroll_bar_visibility
#5231 by @ZeenobitComboBox::close_behavior
#5305 by @avalschpainter.line()
#5291 by @bircniButton::image_tint_follows_text_color
#5430 by @emilkContext::layer_transform_to_global
&layer_transform_from_global
#5465 by @emilk🔧 Changed
Arc
to reduce memory consumption #5276 by @StarStarJegui::util::cache
toegui::cache
; addFramePublisher
#5426 by @emilkOrder::PanelResizeLine
#5455 by @emilkprofiling
crate to support more profiler backends #5150 by @teddemunnik🐛 Fixed
ScrollArea
drag velocity when drag stopped #5175 by @valadaptiveViewportCommand::Visible
#5244 by @rustbasicUi::new_child
does not consider thesizing_pass
field ofUiBuilder
#5262 by @zhatuokunWindow::default_pos
does not work #5315 by @rustbasicSides
did not apply the layout position correctly #5303 by @zhatuokunStyle::override_font_id
inRichText
#5310 by @MStarhaTextEdit
inside aScrollArea
#3660 by @juancampaon_hover_text_at_pointer
for transformed layers #5429 by @emilkArea
outside itsconstrain_rect
#5459 by @MScottMcBeeui.new_child
should now respectdisabled
#5483 by @emilkConfiguration
📅 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.
This PR has been generated by Renovate Bot.