Releases: emilk/egui
0.29.1 - Bug fixes
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
egui
- Remove debug-assert triggered by
with_layer_id/dnd_drag_source
#5191 by @emilk - Fix id clash in
Ui::response
#5192 by @emilk - Do not round panel rectangles to pixel grid #5196 by @emilk
eframe
0.29.0 - Multipass, `UiBuilder`, & visual improvements
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
egui changelog
✨ Highlights
This release adds initial support for multi-pass layout, which is a tool to circumvent a common limitation of immediate mode.
You can use the new UiBuilder::sizing_pass
(#4969) to instruct the Ui
and widgets to shrink to their minimum size, then store that size.
Then call the new Context::request_discard
(#5059) to discard the visual output and do another pass immediately after the current finishes.
Together, this allows more advanced layouts that is normally not possible in immediate mode.
So far this is only used by egui::Grid
to hide the "first-frame jitters" that would sometimes happen before, but 3rd party libraries can also use it to do much more advanced things.
There is also a new UiBuilder
for more flexible construction of Ui
s (#4969).
By specifying a sense
for the Ui
you can make it respond to clicks and drags, reading the result with the new Ui::response
(#5054).
Among other things, you can use this to create buttons that contain arbitrary widgets.
0.29 also adds improve support for automatic switching between light and dark mode.
You can now set up a custom Style
for both dark and light mode, and have egui follow the system preference (#4744 #4860).
There also has been several small improvements to the look of egui:
- Fix vertical centering of text (e.g. in buttons) (#5117)
- Sharper rendering of lines and outlines (#4943)
- Nicer looking text selection, especially in light mode (#5017)
The new text selection
What text selection used to look like
🧳 Migration
id_source
is now calledid_salt
everywhere (#5025)Ui::new
now takes aUiBuilder
(#4969)- Deprecated (replaced with
UiBuilder
):ui.add_visible_ui
ui.allocate_ui_at_rect
ui.child_ui
ui.child_ui_with_id_source
ui.push_stack_info
⭐ Added
- Create a
UiBuilder
for buildingUi
s #4969 by @emilk - Add
egui::Sides
for adding UI on left and right sides #5036 by @emilk - Make light & dark visuals customizable when following the system theme #4744 #4860 by @bash
- Interactive
Ui
:s: addUiBuilder::sense
andUi::response
#5054 by @lucasmerlin - Add a menu button with text and image #4748 by @NicolasBircksZR
- Add
Ui::columns_const()
#4764 by @v0x0g - Add
Slider::max_decimals_opt
#4953 by @bircni - Add
Label::halign
#4975 by @rustbasic - Add
ui.shrink_clip_rect
#5068 by @emilk - Add
ScrollArea::scroll_bar_rect
#5070 by @emilk - Add
Options::input_options
for click-delay etc #4942 by @girtsf - Add
WidgetType::RadioGroup
#5081 by @bash - Add return value to
with_accessibility_parent
#5083 by @bash - Add
Ui::with_visual_transform
#5055 by @lucasmerlin - Make
Slider
andDragValue
compatible withNonZeroUsize
etc #5105 by @emilk - Add
Context::request_discard
for multi-pass layouts #5059 by @emilk - Add UI to modify
FontTweak
live #5125 by @emilk - Add
Response::intrinsic_size
to enable better layout in 3rd party crates #5082 by @lucasmerlin - Add support for mipmap textures #5146 by @nolanderc
- Add
DebugOptions::show_unaligned
#5165 by @emilk - Add
Slider::clamping
for precise clamp control #5119 by @emilk
🚀 Performance
- Optimize
Color32::from_rgba_unmultiplied
with LUT #5088 by @YgorSouza
🔧 Changed
- Rename
id_source
toid_salt
#5025 by @bircni - Avoid some
Id
clashes by seeding auto-ids with child id #4840 by @ironpeak - Nicer looking text selection, especially in light mode #5017 by @emilk
- Fix blurry lines by aligning to pixel grid #4943 by @juancampa
- Center-align all text vertically #5117 by @emilk
- Clamp margin values in
Margin::ui
#4873 by @rustbasic - Make
scroll_to_*
animations configurable #4305 by @lucasmerlin - Update
Button
to correctly align contained image #4891 by @PrimmR - Deprecate
ahash
re-exports #4979 by @oscargus - Fix: Ensures correct IME behavior when the text input area gains or loses focus #4896 by @rustbasic
- Enable rustdoc
generate-link-to-definition
feature on docs.rs #5030 by @GuillaumeGomez - Make some
Memory
methods public #5046 by @bircni - Deprecate
ui.set_sizing_pass
#5074 by @emilk - Export module
egui::frame
#5087 by @simgt - Use
log
crate instead ofeprintln
& remove some unwraps #5010 by @bircni - Fix:
Event::Copy
andEvent::Cut
behave as if they select the entire text when there is no selection #5115 by @rustbasic
🐛 Fixed
- Prevent text shrinking in tooltips; round wrap-width to integer #5161 by @emilk
- Fix bug causing tooltips with dynamic content to shrink #5168 by @emilk
- Remove some debug asserts #4826 by @emilk
- Handle the IME event first in
TextEdit
to fix some bugs #4794 by @rustbasic - Slider: round to decimals after applying
step_by
#4822 by @AurevoirXavier - Fix: hint text follows the alignment set on the
TextEdit
#4889 by @PrimmR - Request focus on a
TextEdit
when clicked #4991 by @Zoxc - Fix
Id
clash inFrame
styling widget #4967 by @YgorSouza - Prevent
ScrollArea
contents from exceeding the container size #5006 by @DouglasDwyer - Fix bug in ...
0.28.1 - Tooltip tweaks
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
egui changelog
⭐ Added
- Add
Image::uri()
#4720 by @rustbasic
🔧 Changed
- Better documentation for
Event::Zoom
#4778 by @emilk - Hide tooltips when scrolling #4784 by @emilk
- Smoother animations #4787 by @emilk
- Hide tooltip on click #4789 by @emilk
🐛 Fixed
- Fix default height of top/bottom panels #4779 by @emilk
- Show the innermost debug rectangle when pressing all modifier keys #4782 by @emilk
- Fix occasional flickering of pointer-tooltips #4788 by @emilk
eframe changelog
- Web: only capture clicks/touches when actually over canvas #4775 by @lucasmerlin
0.28.0 - Sizing pass, and better eframe web
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
egui changelog
✨ Highlights
- Automatic sizing of menus/popups/tooltips with no jittering, using new sizing pass #4557, #4579 by @emilk
- Support interactive widgets in tooltips #4596 by @emilk
- Add a
ui.stack()
with info about all ancestorUi
s, with optional tags #4588 by @abey79, #4617 by @emilk - GIF support #4620 by @JustFrederik
- Blinking text cursor in
TextEdit
#4279 by @emilk
🧳 Migration
- Update MSRV to 1.76 (#4411)
- The
wrap/truncate
functions onLabel/Button/ComboBox
no longer take bools as arguments. Use.wrap_mode(…)
instead for more fine control (#4556) Style::wrap
has been deprecated in favor ofStyle::wrap_mode
(#4556)Ui::new
andui.child_ui
now takes a new parameter for theUiStack
(#4588)- The
extra_asserts
andextra_debug_asserts
feature flags have been removed (#4478) - Remove
Event::Scroll
and handle it in egui. UseEvent::MouseWheel
instead (#4524) Event::Zoom
is no longer emitted on ctrl+scroll. UseInputState::smooth_scroll_delta
instead (#4524)ui.set_enabled
andset_visbile
have been deprecated (#4614)DragValue::clamp_range
renamed torange
((#4728)
⭐ Added
- Overload operators for
Rect + Margin
,Rect - Margin
etc #4277 by @emilk - Add
Window::order
#4301 by @alexparlett - Add a way to specify Undoer settings and construct Undoers more easily #4357 by @valadaptive
- Add xtask crate #4293 by @YgorSouza
- Add
ViewportCommand::RequestCut
,RequestCopy
andRequestPaste
to trigger clipboard actions #4035 by @bu5hm4nn - Added ability to define colors at UV coordinates along a path #4353 by @murl-digital
- Add a
Display
impl forVec2
,Pos2
, andRect
#4428 by @tgross35 - Easing functions #4630 by @emilk
- Add
Options::line_scroll_speed
andscroll_zoom_speed
#4532 by @emilk - Add
TextEdit::hint_text_font
#4517 by @zaaarf - Add
Options::reduce_texture_memory
to free up RAM #4431 by @varphone - Add support for text truncation to
egui::Style
#4556 by @abey79 - Add
Response::show_tooltip_ui
andshow_tooltip_text
#4580 by @emilk - Add
opacity
andmultiply_opacity
functions toUi
andPainter
#4586 by @emilk - Add
Key::Quote
#4683 by @mkeeter - Improve backtraces when hovering widgets with modifiers pressed #4696 by @emilk
- Add
PopupCloseBehavior
#4636 by @Umatriz - Add basic test for egui accesskit output #4716 by @Wcubed
- Add
clamp_to_range
option to DragValue, renameclamp_range
torange
(deprecating the former) #4728 by @Wumpf - Add
Style::number_formatter
as the default used byDragValue
#4740 by @emilk
🔧 Changed
- Improve the UI for changing the egui theme #4257 by @emilk
- Change the resize cursor when you reach the resize limit #4275 by @emilk
- Make
TextEdit
an atomic widget #4276 by @emilk - Rename
fn scroll2
tofn scroll
#4282 by @emilk - Change
Frame::multiply_with_opacity
to multiply in gamma space #4283 by @emilk - Use parent
Ui
s style for popups #4325 by @alexparlett - Take
rounding
into account when usingSlider::trailing_fill
#4308 by @rustbasic - Allow users to create viewports larger than monitor on Windows & macOS #4337 by @lopo12123
- Improve
ViewportBuilder::with_icon()
documentation #4408 by @roccoblues include_image!
now accepts expressions #4521 by @YgorSouza- Remove scroll latency for smooth trackpads #4526 by @emilk
- Smooth out zooming with discreet scroll wheel #4530 by @emilk
- Make
TextEdit::return_key
optional #4543 by @doonv - Better spacing and sizes for (menu) buttons #4558 by @emilk
ComboBox
: fix justified layout of popup if wider than parent button #4570 by @emilk- Make
Area
state public #4576 by @emilk - Don't persist
Area
size #4749 by @emilk - Round text galley sizes to nearest UI point size #4578 by @emilk
- Once you have waited for a tooltip to show, show the next one right away #4585 by @emilk
- Fade in windows, tooltips, popups, etc #4587 by @emilk
- Make
egu::menu
types public #4544 by @sor-ca - The default constrain rect for
Area/Window
is nowctx.screen_rect
#4590 by @emilk - Constrain
Area
s to screen by default #4591 by @emilk Grid
: set thesizing_pass
flag during the initial sizing pass #4612 by @emilk- Remove special case for 0 in DragValue default formatter #4639 by @YgorSouza
- Abort drags when pressing escape key #4678 by @emilk
- Allow setting a layer as a sublayer of another #4690 by @YgorSouza
- Close context menus with Escape #4711 by @emilk
- Cancel DragValue edit if Escape is pressed #4713 by @YgorSouza
- The default parser for
DragValue
andSlider
now ignores whitespace #4739 by @emilk - Disabled widgets are now also disabled in the accesskit output #4750 by @Wcubed
- Make it easier to grab the handle of a floating scroll bar #4754 by @emilk
- When debugging widget rects on hover, show width and height #4762 by @emilk
- Make sure all tooltips close if you open a menu in the same layer [#4766](https://github...
0.27.2 - Fix blurry text on web, and other bug fixes
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
Changelogs
egui
- Fix tooltips for non-interactive widgets #4291
- Fix problem clicking the edge of a
TextEdit
#4272 - Fix incorrect
Response::interact_rect
forArea/Window
#4273 - Fix:
Response::clicked_elsewhere
takes clip rect into account #4274 - Allow disabling animations on a
ScrollArea
#4309 (thanks @lucasmerlin!)
eframe
- Fix blurry rendering in some browsers #4299
- Correctly identify if browser tab has focus #4280
- Fix continuous repaint on Wayland when TextEdit is focused or IME output is set #4269 (thanks @white-axe!)
- Remove a bunch of
unwrap()
#4285
egui_plot
- Allow zoom/pan a plot as long as it contains the mouse cursor #4292
- Prevent plot from resetting one axis while zooming/dragging the other #4252 (thanks @YgorSouza!)
- Fix the same plot tick label being painted multiple times #4307
egui-winit
- Fix continuous repaint on Wayland when TextEdit is focused or IME output is set #4269 (thanks @white-axe!)
0.27.1 - Bug fixes for shadows and touch input
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
egui changelog
🐛 Fixed
- Fix visual glitch on the right side of highly rounded rectangles #4244
- Prevent visual glitch when shadow blur width is very high #4245
- Fix
InputState::any_touches
and addInputState::has_touch_screen
#4247 - Fix
Context::repaint_causes
returning no causes #4248 - Fix touch-and-hold to open context menu #4249
- Hide shortcut text on zoom buttons if
zoom_with_keyboard
is false #4262
🔧 Changed
- Don't apply a clip rect to the contents of an
Area
orWindow
#4258
eframe changelog
- Web: repaint if the
#hash
in the URL changes #4261 - Add web support for
zoom_factor
#4260 (thanks @justusdieckmann!)
0.27.0 - Nicer menus and new hit test logic
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
egui changelog
The hit test logic (what is the user clicking on?) has been completely rewritten, and should now be much more accurate and helpful.
The hit test and interaction logic is run at the start of the frame, using the widgets rects from the previous frame, but the latest mouse coordinates.
It enabled getting a Response
for a widget before creating it using Context::read_response
.
This will in the future unlock more powerful widget styling options.
The new hit test also allows clicking slightly outside a button and still hit it, improving the support for touch screens.
The menus have also been improved so that they both act and feel better, with no change in API.
Included in this is much nicer looking shadows, supporting an offset.
⚠️ BREAKING
Response::clicked*
andResponse::dragged*
may lock theContext
, so don't call it from aContext
-locking closure.Response::clicked_by
will no longer be true if clicked with keyboard. UseResponse::clicked
instead.Memory::focus
has been renamedMemory::focused
Area::new
now takes anId
by argument #4115- Change the definition of
clicked_by
#4192
☰ Menu related improvements
- Add some distance between parent menu and submenu #4230
- Add
Area::sense
and improve hit-testing of buttons in menus #4234 - Improve logic for when submenus are kept open #4166
- Better align menus with the button that opened them #4233
- Hide hover UI when showing the context menu #4138 (thanks @abey79!)
- CSS-like
Shadow
with offset, spread, and blur #4232 - On touch screens, press-and-hold equals a secondary click #4195
⭐ Added
- Add with_taskbar to viewport builder #3958 (thanks @AnotherNathan!)
- Add F21 to F35 key bindings #4004 (thanks @oscargus!)
- Add
Options::debug_paint_interactive_widgets
#4018 - Add
Ui::set_opacity
#3965 (thanks @YgorSouza!) - Add
Response::paint_debug_info()
to make it easy to visualize a widget's id and state #4056 (thanks @abey79!) - Add layer transforms, interaction in layer #3906 (thanks @Tweoss!)
- Add
ColorImage::from_gray_iter
#3536 (thanks @wangxiaochuTHU!) - Add API for raw mouse motion #4063 (thanks @GiantBlargg!)
- Add accessibility to
ProgressBar
andSpinner
#4139 (thanks @DataTriny!) - Add x11 window type settings to viewport builder #4175 (thanks @psethwick!)
- Add an API for customizing the return key in TextEdit #4085 (thanks @lemon-sh!)
- Convenience
const fn
forMargin
,Rounding
andShadow
#4080 (thanks @0Qwel!) - Serde feature: add serde derives to input related structs #4100 (thanks @gweisert!)
- Give each menu
Area
an id distinct from the id of what was clicked #4114 epaint
: AddedShape::{scale,translate}
wrappers #4090 (thanks @varphone!)- A
Window
can now be resizable in only one direction #4155 - Add
EllipseShape
#4122 (thanks @TheTacBanana!) - Adjustable Slider rail height #4092 (thanks @rustbasic!)
- Expose state override for
HeaderResponse
#4200 (thanks @Zeenobit!)
🔧 Changed
TextEdit
: Changemargin
property toegui::Margin
type #3993 (thanks @bu5hm4nn!)- New widget interaction logic #4026
ui.dnd_drop_zone()
now returnsInnerResponse
. #4079 (thanks @sowbug!)- Support interacting with the background of a
Ui
#4074 - Quickly animate scroll when calling
ui.scroll_to_cursor
etc #4119 - Don't clear modifier state on focus change #4157 (thanks @ming08108!)
- Prevent
egui::Window
from becoming larger than viewport #4199 (thanks @rustbasic!) - Don't show URLs when hovering hyperlinks #4218
🐛 Fixed
- Fix incorrect handling of item spacing in
Window
title bar #3995 (thanks @varphone!) - Make
on_disabled_hover_ui
respecttooltip_delay
#4012 (thanks @YgorSouza!) - Fix
TextEdit
being too short whenever there is horizontal margin #4005 (thanks @gweisert!) - Fix
Response::interact
andUi:interact_with_hovered
#4013 - Fix:
Response.interact_pointer_pos
isSome
on click and drag released #4014 - Fix custom
Window
Frame
s #4009 (thanks @varphone!) - Fix: images with background color now respects rounding #4029 (thanks @vincent-sparks!)
- Fixed the incorrect display of the
Window
frame with a wide border or large rounding #4032 (thanks @varphone!) - TextEdit: fix crash when hitting SHIFT + TAB around non-ASCII text #3984 (thanks @rustbasic!)
- Fix two
ScrollArea
bugs: leaking scroll target and broken animation to target offset #4174 (thanks @abey79!) - Fix bug in
Context::parent_viewport_id
#4190 (thanks @rustbasic!) - Remove unnecessary allocation in
RepaintCause::new
#4146 (thanks @valsteen!)
eframe changelog
- Update to document-features 0.2.8 #4003
- Added
App::raw_input_hook
allows for the manipulation or filtering of raw input events #4008 (thanks @varphone!)
Desktop/Native
- Add with_taskbar to viewport builder #3958 (thanks @AnotherNathan!)
- Add
winuser
feature towinapi
to fix unresolved import #4037 (thanks @varphone!) - Add
get_proc_address
in CreationContext #4145 (thanks @Chaojimengnan!) - Don't clear modifier state on focus change #4157 (thanks @ming08108!)
- Add x11 window type settings to viewport builder #4175 (thanks @psethwick!)
Web
- Add
webgpu
feature by default to wgpu #4124 (thanks @ctaggart!) - Update kb modifiers from web mouse events #4156 (thanks @ming08108!)
- Fix crash on
request_animation_frame
when destroying web runner #4169 (thanks @jprochazk!) - Fix bug parsing url query with escaped & or = #4172
Location::query_map
: support repeated key #4183
0.26.2 - Response.interact/context_menu fix
egui
eframe
egui_glow && egui-winit
0.26.1 - Bug Fixes
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it the only demo: https://www.egui.rs/
egui
- Fix
Window
title bar incorrect handling spacing #3995 (thanks @varphone!) - Make
on_disabled_hover_ui
respecttooltip_delay
#4012 (thanks @YgorSouza!) - Fix
TextEdit
being too short whenever there is horizontal margin #4005 (thanks @gweisert!) - Fix
Response::interact
andUi:interact_with_hovered
#4013 - Fix:
Response.interact_pointer_pos
isSome
on click and drag released #4014 - Fix custom
Window
Frame
s #4009 (thanks @varphone!)
eframe
- Fix high CPU usage on Windows when app is minimized #3985 (thanks @rustbasic!)
- Update to document-features 0.2.8 #4003
egui_glow
egui-wgpu
- Improve panic message in egui-wgpu when failing to create buffers #3986
0.26.0 - Text selection in labels
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui changelog
⚠️ BREAKING
- Always set
response.hovered
to false when dragging another widget #3860 InputState::scroll_delta
has been replaced byInputState::raw_scroll_delta
andInputState::smooth_scroll_delta
#3884- Improve
Response.dragged
,drag_started
andclicked
#3888
⭐ Added
- Selectable text in Labels #3814 #3870
- Add some drag-and-drop-related APIs in
Response
andMemory
#3876 (thanks @abey79!) - Add drag-and-drop APIs with payloads storage #3887
ComboBox
: add builder method for height #3001 (thanks @hinto-janai!)- Add keys
?
,/
,|
#3820 - Add
Response::contains_pointer
#3859 - Add
Align2::anchor_size
#3863 - Add
Context::debug_text
#3864 - Allow read access to shapes added to painter this frame #3866 (thanks @brunizzl!)
- Register callbacks with
Context::on_begin_frame
andon_end_frame
#3886 - Improve
Frame
API to allow picking color until after adding content #3889 - Add opacity factor to
TextShape
#3916 (thanks @StratusFearMe21!) Context::repaint_causes
:file:line
of what caused a repaint #3949- Add
TextureOptions::wrap_mode
#3954 (thanks @CodedNil!) - Add
Spacing::menu_width
#3973
🔧 Changed
- Move text selection logic to own module #3843
- Smooth scrolling #3884
- Turn off text wrapping by default in combo-box popups #3912
Response.context_menu
now returns the response of the context menu, if open #3904 (thanks @AufarZakiev!)- Update to puffin 0.19 #3940
- Wait with showing tooltip until mouse has been still for 300ms #3977
🐛 Fixed
- Fix: dragging to above/below a
TextEdit
orLabel
will select text to begin/end #3858 - Fix clickable widgets blocking scrolling on touch screens #3815 (thanks @lucasmerlin!)
- Fix
stable_dt
#3832 - Bug Fix :
Response::is_pointer_button_down_on
is now false the frame the button is released #3833 (thanks @rustbasic!) - Use runtime knowledge of OS for OS-specific text editing #3840
- Fix calling
request_repaint_after
every frame causing immediate repaint #3978
🚀 Performance
- Niche-optimize
Id
so thatOption<Id>
is the same size asId
#3932 - Parallel tessellation with opt-in
rayon
feature #3934
eframe changelog
- Update
wgpu
to 0.19 #3824 - Disable the default features of
wgpu
#3875 - Much more accurate
cpu_usage
timing #3913 - Update to puffin 0.19 #3940
Desktop/Native:
- Keep
ViewportInfo::maximized
andminimized
up-to-date on Windows #3831 (thanks @rustbasic!) - Handle
IconData::default()
without crashing #3842 - Fix Android crash on resume #3847 #3867 (thanks @Garoven!)
- Add
WgpuConfiguration::desired_maximum_frame_latency
#3874 - Don't call
App::update
on minimized windows #3877 (thanks @rustbasic!)