Releases: emilk/egui
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!)
Web:
0.26.0 Alpha 1 - Selectable Labels
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
orLabel
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
andMemory
#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
andon_end_frame
. #3886 - Improve
Response.dragged
,drag_started
andclicked
#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 thatOption<Id>
is the same size asId
#3932 - Parallell tessellation #3934
- Update to puffin 0.19 #3940
eframe
- Keep
ViewportInfo::maximized
andminimized
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 ofwgpu
#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
andwayland
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
andwayland
features to egui-wgpu and egui_glow #3909 (thanks @YgorSouza!)
egui-winit
- Don't consume clipboard shortcuts #3812 (thanks @Dinnerbone!)
- ✋
egui_winit
: Allow getting theclipboard
andallow_ime
state #3724 (thanks @tosti007!)
epaint
- Add
Align2::anchor_size
#3863 - Add opacity factor to
TextShape
#3916 (thanks @StratusFearMe21!) - Parallell tessellation #3934
0.25.0 - Better keyboard 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/
⚠️ BREAKING
- Ignore extra SHIFT and ALT when matching modifiers #3769
- Replace
Key::PlusEquals
withKey::Plus
andKey::Equals
#3769 - Removed
WidgetTextGalley
,WidgetTextJob
,RichText::into_text_job
,WidgetText::into_text_job
#3727 - Rename
TextBuffer::replace
toreplace_with
#3751
⭐ Added
- Replace a special
Color32::PLACEHOLDER
with widget fallback color #3727 - Add
Key
s forCut
Copy
Paste
[
]
,
\
:
.
;
+
=
#3725 #3373 #3649 #3769 (thanks @MarijnS95 and @mkrueger!) - Add
Key::from_name
,Key::ALL
#3649 - Add
Event::Key::physical_key
#3649 - Add indeterminate state to checkbox #3605 (thanks @YgorSouza!)
- Add
Color32::from_hex
andColor32::to_hex
#3570 #3777 (thanks @YgorSouza!) - Add
DragValue
s for RGB(A) in the color picker #2734 (thanks @IVAN-MK7!) - Add option to customize progress bar rounding #2881 (thanks @YgorSouza!)
- Add methods to load/store
TextEditState
undoer #3479 (thanks @LoganDark!) ScrollArea
: Add option to always scroll the only enabled direction #3710 (thanks @untbu!)
🔧 Changed
Grid
now followsstyle.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 byVisuals.window_highlight_topmost
#3515 (thanks @GuillaumeSchmid!)
🐛 Fixed
- Derive
serde
Serialize
andDeserialize
forKeyboardShortcut
#3694 (thanks @zeozeozeo!) - Fix
Window
positioning bug when badpivot
is stored in app data #3721 (thanks @abey79!) - Impl
Clone
forFonts
#3737 - Add missing
ResizeDirection::East
#3749 (thanks @dbuch!) - Fix: don't open context menu on drag #3767
- Fix IME input of
CompositionEnd
without aCompositionStart
#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
Area
s 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
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 callingApp::update
#3665
Web:
0.24.0 - Multi-viewport
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/
✨ 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 withctx.input(|i| i.viewport())
🔧 Changed
🐛 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 withOptions::zoom_with_keyboard
, which istrue
by defaultSpacing::scroll_bar_X
has been moved toSpacing::scroll_bar.X
Context::set_pixels_per_point
now callsContext::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 theeframe
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 ofViewportOutput
inFullOutput
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)