Skip to content

Releases: emilk/egui

0.29.1 - Bug fixes

01 Oct 08:12
Compare
Choose a tag to compare

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

  • Linux: Disable IME to fix backspace/arrow keys #5188 by @emilk

0.29.0 - Multipass, `UiBuilder`, & visual improvements

26 Sep 13:35
Compare
Choose a tag to compare

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 Uis (#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

New text selection in light mode New text selection in dark mode

What text selection used to look like

Old text selection in light mode Old text selection in dark mode

🧳 Migration

  • id_source is now called id_salt everywhere (#5025)
  • Ui::new now takes a UiBuilder (#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

🚀 Performance

🔧 Changed

🐛 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 in Frame styling widget #4967 by @YgorSouza
  • Prevent ScrollArea contents from exceeding the container size #5006 by @DouglasDwyer
  • Fix bug in ...
Read more

0.28.1 - Tooltip tweaks

05 Jul 10:13
Compare
Choose a tag to compare

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

🔧 Changed

🐛 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

0.28.0 - Sizing pass, and better eframe web

03 Jul 13:02
Compare
Choose a tag to compare

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

🧳 Migration

  • Update MSRV to 1.76 (#4411)
  • The wrap/truncate functions on Label/Button/ComboBox no longer take bools as arguments. Use .wrap_mode(…) instead for more fine control (#4556)
  • Style::wrap has been deprecated in favor of Style::wrap_mode (#4556)
  • Ui::new and ui.child_ui now takes a new parameter for the UiStack (#4588)
  • The extra_asserts and extra_debug_asserts feature flags have been removed (#4478)
  • Remove Event::Scroll and handle it in egui. Use Event::MouseWheel instead (#4524)
  • Event::Zoom is no longer emitted on ctrl+scroll. Use InputState::smooth_scroll_delta instead (#4524)
  • ui.set_enabled and set_visbile have been deprecated (#4614)
  • DragValue::clamp_range renamed to range ((#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 and RequestPaste 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 for Vec2, Pos2, and Rect #4428 by @tgross35
  • Easing functions #4630 by @emilk
  • Add Options::line_scroll_speed and scroll_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 and show_tooltip_text #4580 by @emilk
  • Add opacity and multiply_opacity functions to Ui and Painter #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, rename clamp_range to range (deprecating the former) #4728 by @Wumpf
  • Add Style::number_formatter as the default used by DragValue #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 to fn scroll #4282 by @emilk
  • Change Frame::multiply_with_opacity to multiply in gamma space #4283 by @emilk
  • Use parent Uis style for popups #4325 by @alexparlett
  • Take rounding into account when using Slider::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 now ctx.screen_rect #4590 by @emilk
  • Constrain Areas to screen by default #4591 by @emilk
  • Grid: set the sizing_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 and Slider 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...
Read more

0.27.2 - Fix blurry text on web, and other bug fixes

02 Apr 16:17
Compare
Choose a tag to compare

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 for Area/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

29 Mar 11:57
Compare
Choose a tag to compare

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 add InputState::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 or Window #4258

eframe changelog

0.27.0 - Nicer menus and new hit test logic

26 Mar 16:21
Compare
Choose a tag to compare

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.

Screenshot 2024-03-26 at 17 00 23

⚠️ BREAKING

  • Response::clicked* and Response::dragged* may lock the Context, so don't call it from a Context-locking closure.
  • Response::clicked_by will no longer be true if clicked with keyboard. Use Response::clicked instead.
  • Memory::focus has been renamed Memory::focused
  • Area::new now takes an Id 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 and Spinner #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 for Margin, Rounding and Shadow #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: Added Shape::{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: Change margin property to egui::Margin type #3993 (thanks @bu5hm4nn!)
  • New widget interaction logic #4026
  • ui.dnd_drop_zone() now returns InnerResponse. #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 respect tooltip_delay #4012 (thanks @YgorSouza!)
  • Fix TextEdit being too short whenever there is horizontal margin #4005 (thanks @gweisert!)
  • Fix Response::interact and Ui:interact_with_hovered #4013
  • Fix: Response.interact_pointer_pos is Some on click and drag released #4014
  • Fix custom Window Frames #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

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

14 Feb 09:51
Compare
Choose a tag to compare

egui

  • Avoid interacting twice when not required #4041 (thanks @abey79!)

eframe

  • Add winuser feature to winapi to fix unresolved import #4037 (thanks @varphone!)

egui_glow && egui-winit

  • Update memoffset to 0.9.0, arboard to 3.3.1, and remove egui_glow's needless dependency on pure_glow's deps #4036 (thanks @Nopey!)

0.26.1 - Bug Fixes

11 Feb 08:05
Compare
Choose a tag to compare

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 respect tooltip_delay #4012 (thanks @YgorSouza!)
  • Fix TextEdit being too short whenever there is horizontal margin #4005 (thanks @gweisert!)
  • Fix Response::interact and Ui:interact_with_hovered #4013
  • Fix: Response.interact_pointer_pos is Some on click and drag released #4014
  • Fix custom Window Frames #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

  • Only disable sRGB framebuffer on supported platforms #3994 (thanks @Nopey!)

egui-wgpu

  • Improve panic message in egui-wgpu when failing to create buffers #3986

0.26.0 - Text selection in labels

05 Feb 16:43
Compare
Choose a tag to compare

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/

text_selection

egui changelog

⚠️ BREAKING

  • Always set response.hovered to false when dragging another widget #3860
  • InputState::scroll_delta has been replaced by InputState::raw_scroll_delta and InputState::smooth_scroll_delta #3884
  • Improve Response.dragged, drag_started and clicked #3888

⭐ Added

  • Selectable text in Labels #3814 #3870
  • Add some drag-and-drop-related APIs in Response and Memory #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 and on_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 or Label 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 that Option<Id> is the same size as Id #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 and minimized 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!)

Web:

  • When using wgpu on web, eframe will try to use WebGPU if available, then fall back to WebGL #3824 #3895 (thanks @Wumpf!)