Skip to content

Releases: emilk/egui

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!)

0.26.0 Alpha 1 - Selectable Labels

01 Feb 19:31
Compare
Choose a tag to compare
Pre-release

Try it out with version string 0.26.0-alpha.1

Changelogs

Full diff at https://github.com/emilk/egui/compare/0.25.0..HEAD

egui

  • Selectable text in Labels #3814
  • ComboBox: add builder method for height #3001 (thanks @hinto-janai!)
  • Add keys ?, /, | #3820
  • 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
  • Refactor: move text selection logic to own module #3843
  • Fix: dragging to above/below a TextEdit or Label will select text to begin/end #3858
  • Add Response::contains_pointer #3859
  • Always set response.hovered to false when dragging another widget #3860
  • Add Align2::anchor_size #3863
  • Add Context::debug_text #3864
  • Add some drag-and-drop-related APIs in Response and Memory #3876 (thanks @abey79!)
  • Allow read access to shapes added to painter this frame #3866 (thanks @brunizzl!)
  • Cross-widget text select #3870
  • Smooth scrolling #3884
  • Register callbacks with Context::on_begin_frame and on_end_frame. #3886
  • Improve Response.dragged, drag_started and clicked #3888
  • Improve Frame API to allow picking color until after adding content #3889
  • Add drag-and-drop APIs with payloads storage #3887
  • 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!)
  • Add opacity factor to TextShape #3916 (thanks @StratusFearMe21!)
  • Auto-repaint when widgets move or changes id. #3930
  • Niche-optimize Id so that Option<Id> is the same size as Id #3932
  • Parallell tessellation #3934
  • Update to puffin 0.19 #3940

eframe

  • Keep ViewportInfo::maximized and minimized up-to-date on Windows #3831 (thanks @rustbasic!)
  • Update wgpu to 0.19 #3824
  • Fix: handle IconData::default() without crashing #3842
  • Fix Android crash on resume #3847 (thanks @Garoven!)
  • Add WgpuConfiguration::desired_maximum_frame_latency #3874
  • egui-wgpu: turn off the default features of wgpu #3875
  • Fix Android crash on resume with Glow backend #3867 (thanks @Garoven!)
  • Don't call App::update on minimized windows #3877 (thanks @rustbasic!)
  • Much more accurate cpu_usage timing #3913
  • Update to puffin 0.19 #3940

egui_extras

egui_plot

  • Make egui_plot::PlotMemory public #3871
  • Customizable spacing of grid and axis label spacing #3896
  • Change default plot line thickness from 1.0 to 1.5 #3918
  • Expand plot axes thickness to fit their labels #3921
  • Plot items now have optional id which is returned in the plot's response when hovered #3920 (thanks @Wumpf!)
  • Parallell tessellation #3934

egui_glow

  • Add x11 and wayland features to egui-wgpu and egui_glow #3909 (thanks @YgorSouza!)

egui-wgpu

  • Update wgpu to 0.19 #3824
  • Add WgpuConfiguration::desired_maximum_frame_latency #3874
  • Turn off the default features of wgpu #3875
  • Re-try adapter creation if creation with WebGPU enabled fails and WebGL was enabled. #3895 (thanks @Wumpf!)
  • Postpone call to get_current_texture #3914
  • Add x11 and wayland features to egui-wgpu and egui_glow #3909 (thanks @YgorSouza!)

egui-winit

  • Don't consume clipboard shortcuts #3812 (thanks @Dinnerbone!)
  • egui_winit: Allow getting the clipboard and allow_ime state #3724 (thanks @tosti007!)

epaint

0.25.0 - Better keyboard input

08 Jan 11:36
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/

⚠️ BREAKING

  • Ignore extra SHIFT and ALT when matching modifiers #3769
  • Replace Key::PlusEquals with Key::Plus and Key::Equals #3769
  • Removed WidgetTextGalley, WidgetTextJob, RichText::into_text_job, WidgetText::into_text_job #3727
  • Rename TextBuffer::replace to replace_with #3751

⭐ Added

🔧 Changed

  • Grid now follows style.visuals.striped if not explicitly overwritten #3723 (thanks @Wcubed!)
  • Allow arrow keys to move away focus from a Slider #3641 (thanks @fornwall!)
  • Keep submenus open until another one is hovered #3055 (thanks @DannyStoll1!)
  • Highlight the header of the topmost Window, controlled by Visuals.window_highlight_topmost #3515 (thanks @GuillaumeSchmid!)

🐛 Fixed

  • Derive serde Serialize and Deserialize for KeyboardShortcut #3694 (thanks @zeozeozeo!)
  • Fix Window positioning bug when bad pivot is stored in app data #3721 (thanks @abey79!)
  • Impl Clone for Fonts #3737
  • Add missing ResizeDirection::East #3749 (thanks @dbuch!)
  • Fix: don't open context menu on drag #3767
  • Fix IME input of CompositionEnd without a CompositionStart #3768 (thanks @FrankLeeC!)
  • Fix: allow using the full Private Use Area for custom fonts #3509 (thanks @varphone!)
  • Fix: apply edited DragValue when it looses focus #3776
  • Fix: Non-resizable Areas now ignore mouse input outside their bounds #3039 (thanks @fleabitdev!)
  • Highlight submenu buttons when hovered and open #3780
  • Invalidate font atlas on any change to pixels_per_point, not matter how small #3698 (thanks @StarStarJ!)
  • Fix zoom-in shortcut (Cmd +) on non-English keyboards #3769

0.24.1 - Bug fixes

30 Nov 16:54
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 changelog

  • Fix buggy text with multiple viewports on monitors with different scales #3666

eframe changelog

Desktop/Native:

  • Fix window flashing white on launch #3631 (thanks @zeozeozeo!)
  • Fix windowing problems when using the x11 feature on Linux #3643
  • Fix bugs when there are multiple monitors with different scales #3663
  • glow backend: clear framebuffer color before calling App::update #3665

Web:

  • Fix click-to-copy on Safari #3621
  • Don't throw away frames on click/copy/cut #3623
  • Remove dependency on tts #3651

0.24.0 - Multi-viewport

23 Nov 15:28
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/

code-example

✨ 0.24 Highlights

You can now spawn multiple native windows on supported backends (e.g. eframe), using the new viewport API (#3172).

You can easily zoom any egui app using Cmd+Plus, Cmd+Minus or Cmd+0, just like in a browser (#3608).

Scrollbars are now hidden by default until you hover the ScrollArea (#3539).

⭐ Added

  • Multiple viewports/windows #3172 (thanks @konkitoman!)
  • Introduce global zoom_factor #3608
  • Floating scroll bars #3539
  • Add redo support to Undoer #3478 (thanks @LoganDark!)
  • Add egui::Vec2b #3543
  • Add max Window size & other size helpers #3537 (thanks @arduano!)
  • Allow changing shape of slider handle #3429 (thanks @YgorSouza!)
  • RawInput::viewports contains a list of all viewports. Access the current one with ctx.input(|i| i.viewport())

🔧 Changed

  • Replace Id::null() with Id::NULL #3544
  • Update MSRV to Rust 1.72 #3595
  • Update puffin to 0.18 #3600

🐛 Fixed

  • Fix upside down slider in the vertical orientation #3424 (thanks @YgorSouza!)
  • Make slider step account for range start #3488 (thanks @YgorSouza!)
  • Fix rounding of ImageButton #3531 (thanks @chriscate!)
  • Fix naming: constraint_to -> constrain_to #3438 (thanks @rinde!)
  • Fix Shift+Tab behavior when no widget is focused #3498 (thanks @DataTriny!)
  • Fix scroll not sticking when scrollbar is hidden #3434 (thanks @LoganDark!)
  • Add #[inline] to all builder-pattern functions #3557
  • Properly reverse bool animation if value changes before it's finished #3577 (thanks @YgorSouza!)

⚠️ BREAKING

  • egui::gui_zoom::zoom_with_keyboard_shortcuts is gone, replaced with Options::zoom_with_keyboard, which is true by default
  • Spacing::scroll_bar_X has been moved to Spacing::scroll_bar.X
  • Context::set_pixels_per_point now calls Context::set_zoom_level, and it may make sense for you to call that directly instead
  • If you are using eframe, check out the breaking changes in the eframe changelog

For integrations

There are several changes relevant to integrations.

  • Added crate::RawInput::viewports with information about all active viewports
  • The repaint callback set by Context::set_request_repaint_callback now points to which viewport should be repainted
  • Context::run now returns a list of ViewportOutput in FullOutput which should result in their own independent windows
  • There is a new Context::set_immediate_viewport_renderer for setting up the immediate viewport integration
  • If you support viewports, you need to call Context::set_embed_viewports(false), or all new viewports will be embedded (the default behavior)