mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
* Make egui_glow and opt-in backend for eframe * Add egui_glow to Cargo.toml and to CI * Reference egui_glow where egui_glium is mentioned * Remove path-patches from root Cargo.toml * Add instructions on how to enable the glow backend of eframe
20 KiB
20 KiB
egui changelog
All notable changes to the egui crate will be documented in this file.
NOTE: epaint, eframe, egui_web, egui-winit, egui_glium, and egui_glow have their own changelogs!
Unreleased
Added ⭐
- Add horizontal scrolling support to
ScrollAreaandWindow(opt-in). TextEdit::layouter: Add custom text layout for e.g. syntax highlighting or WYSIWYG.Fonts::layout_job: New text layout engine allowing mixing fonts, colors and styles, with underlining and strikethrough.- Add
ui.add_enabled(bool, widget)to easily add a possibly disabled widget. - Add
ui.add_enabled_ui(bool, |ui| …)to create a possibly disabled UI section. - Add feature
"serialize"separatedly from"persistence". - Add
egui::widgets::global_dark_light_mode_buttonsto easily add buttons for switching the egui theme. TextEditcan now be used to show text which can be selectedd and copied, but not edited.- Add
Memory::cachesfor caching things from one frame to the next.
Changed 🔧
- Label text will now be centered, right-aligned and/or justified based on the layout.
Hyperlinkwill now word-wrap just like aLabel.- All
Ui:s must now have a finitemax_rect.- Deprecated:
max_rect_finite,available_size_before_wrap_finiteandavailable_rect_before_wrap_finite.
- Deprecated:
Painter/Fonts: text layout now expect a color when creating aGalley. You may override that color withPainter::galley_with_color.- MSRV (Minimum Supported Rust Version) is now
1.54.0. - By default,
DragValue:s no longer show a tooltip when hovered. Change withStyle::explanation_tooltips. - Smaller and nicer color picker.
ScrollAreawill auto-shrink to content size unless told otherwise usingScollArea::auto_shrink.- By default,
Slider'sclamp_to_rangeis set to true. - Rename
TextEdit::enabledtoTextEdit::interactive. ui.label(and friends) now takeimpl ToStringas argument instead ofimpl Into<Label>.
Fixed 🐛
- Fix wrongly sized multiline
TextEditin justified layouts. - Fix clip rectangle of windows that don't fit the central area.
- Show tooltips above widgets on touch screens.
- Fix popups sometimes getting clipped by panels.
Removed 🔥
- Replace
Button::enabledwithui.add_enabled.
0.14.2 - 2021-08-28 - Window resize fix
Fixed 🐛
- Fix window resize bug introduced in
0.14.1.
0.14.1 - 2021-08-28 - Layout bug fixes
Added ⭐
- Add
Ui::horizontal_top.
Fixed 🐛
- Fix
set_width/set_min_width/set_height/set_min_height/expand_to_include_x/expand_to_include_y. - Make minimum grid column width propagate properly.
- Make sure
TextEditcontents expand to fill width if applicable. ProgressBar: add a minimum width and fix for having it in an infinite layout.- Fix sometimes not being able to click inside a combo box or popup menu.
0.14.0 - 2021-08-24 - Ui panels and bug fixes
Added ⭐
- Panels can now be added to any
Ui. - Plot:
- Line styles.
- Add
show_backgroundandshow_axesmethods toPlot.
- Progress bar.
Grid::num_columns: allow the last column to take up the rest of the space of the parentUi.- Add an API for dropping files into egui (see
RawInput). CollapsingHeadercan now optionally be selectable.
Changed 🔧
- A single-line
TextEditwill now clip text that doesn't fit in it, and scroll. - Return closure return value from
Area::show,ComboBox::show_ui,ComboBox::combo_box_with_label,Window::show,popup::*,menu::menu. - Only move/resize windows with primary mouse button.
- Tooltips are now moved to not cover the widget they are attached to.
Fixed 🐛
- Fix custom font definitions getting replaced when
pixels_per_pointis changed. - Fix
lost_focusforTextEdit. - Clicking the edge of a menu button will now properly open the menu.
- Fix hover detection close to an
Area. - Fix case where
Plot'smin_auto_boundscould be ignored after the first call toPlot::ui. - Fix slow startup when using large font files.
Contributors 🙏
0.13.1 - 2021-06-28 - Plot fixes
Added ⭐
- Plot: you can now set the stroke of a
HLine/VLine.
Changed 🔧
Plot::newnow takes anid_source: impl Hashinstead of aname: impl ToString. Functionally it is the same.
0.13.0 - 2021-06-24 - Better panels, plots and new visual style
Added ⭐
- Plot:
- Panels:
- Add right and bottom panels (
SidePanel::rightandPanel::bottom). - Panels can now be resized.
- Add an option to overwrite frame of a
Panel.
- Add right and bottom panels (
- Improve accessibility / screen reader.
- Add
ScrollArea::show_rowsfor efficient scrolling of huge UI:s. - Add
ScrollArea::enable_scrollingto allow freezing scrolling when editing TextEdit widgets within it - Add
Ui::set_visibleas a way to hide widgets. - Add
Style::override_text_styleto easily change the text style of everything in aUi(or globally). - You can now change
TextStyleon checkboxes, radio buttons andSelectableLabel. - Add support for cint under
cintfeature. - Add features
extra_assertsandextra_debug_assertsto enable additional checks. TextEditnow supports edits on a generic buffer usingTextBuffer.- Add
Context::set_debug_on_hoverandegui::trace!(ui)
Changed 🔧
- Minimum Rust version is now 1.51 (used to be 1.52)
- Tweaked the default visuals style.
- Plot: Renamed
CurvetoLine. TopPanel::topis nowTopBottomPanel::top.SidePanel::leftno longet takes the default width by argument, but by a builder call.SidePanel::leftis resizable by default.
Fixed 🐛
- Fix uneven lettering on non-integral device scales ("extortion lettering").
- Fix invisible scroll bar when native window is too narrow for egui.
0.12.0 - 2021-05-10 - Multitouch, user memory, window pivots, and improved plots
Added ⭐
- Add anchors to windows and areas so you can put a window in e.g. the top right corner.
- Make labels interactive with
Label::sense(Sense::click()). - Add
Response::request_focusandResponse::surrender_focus. - Add
TextEdit::code_editor(VERY basic). - Pan and zoom plots.
- Add plot legends.
- Users can now store custom state in
egui::Memory. - Add
Response::on_disabled_hover_textto show tooltip for disabled widgets. - Zoom input: ctrl-scroll and (on
egui_web) trackpad-pinch gesture. - Support for raw multi touch events,
enabling zoom, rotate, and more. Works with
egui_webon mobile devices, and should work withegui_gliumfor certain touch devices/screens. - Add (optional) compatibility with mint.
Changed 🔧
- Make
Memory::has_focuspublic (again). Plotmust now be given a name that is unique within its scope.- Tab only selects labels if the
screen_readeroption is turned on. - Rename
ui.wraptoui.scope.
Fixed 🐛
- Fix defocus-bug on touch screens.
- Fix bug with the layout of wide
DragValue:s.
Removed 🔥
- Moved experimental markup language to
egui_demo_lib
0.11.0 - 2021-04-05 - Optimization, screen reader & new layout logic
Added ⭐
- You can now give focus to any clickable widget with tab/shift-tab.
- Use space or enter to click the selected widget.
- Use arrow keys to adjust sliders and
DragValues.
- egui will now output events when widgets gain keyboard focus.
- This can be hooked up to a screen reader to aid the visually impaired
- Add the option to restrict the dragging bounds of
WindowandAreato a specified area usingdrag_bounds(rect). - Add support for small and raised text.
- Add
ui.set_row_height. - Add
DebugOptions::show_widgetsto debug layouting by hovering widgets. - Add
ComboBoxto more easily customize combo boxes. - Add
Slider::newandDragValue::newto replace old type-specific constructors. - Add
TextEdit::passwordto hide input characters.
Changed 🔧
ui.advance_cursoris now calledui.add_space.kb_focusis now just calledfocus.
Fixed 🐛
- Fix some bugs related to centered layouts.
- Fixed secondary-click to open a menu.
- Fix panic for zero-range sliders and zero-speed drag values.
- Fix false id clash error for wrapping text.
- Fix bug that would close a popup (e.g. the color picker) when clicking inside of it.
Deprecated ☢️
- Deprectated
combo_box_with_labelin favor of newComboBox. - Deprectated type-specific constructors for
SliderandDragValue(Slider::f32,DragValue::usizeetc).
0.10.0 - 2021-02-28 - Plot and polish
Added ⭐
- Add
egui::plot::Plotto plot some 2D data. - Add
Ui::hyperlink_to(label, url). - Sliders can now have a value prefix and suffix (e.g. the suffix
"°"works like a unit). Context::set_pixels_per_pointto control the scale of the UI.- Add
Response::changed()to query if e.g. a slider was dragged, text was entered or a checkbox was clicked. - Add support for all integers in
DragValueandSlider(except 128-bit).
Changed 🔧
- Improve the positioning of tooltips.
- Only show tooltips if mouse is still.
Sliderwill now show the value display by default, unless turned off with.show_value(false).- The
Slidervalue is now aDragValuewhich when dragged can pick values outside of the slider range (unlessclamp_to_rangeis set).
0.9.0 - 2021-02-07 - Light Mode and much more
Added ⭐
- Add support for secondary and middle mouse buttons.
- Add
Labelmethods for code, strong, strikethrough, underline and italics. - Add
ui.group(|ui| { … })to visually group some widgets within a frame. - Add
Uihelpers for doing manual layout (ui.put,ui.allocate_ui_at_rectand more). - Add
ui.set_enabled(false)to disable all widgets in aUi(grayed out and non-interactive). - Add
TextEdit::hint_textfor showing a weak hint text when empty. egui::popup::popup_below_widget: show a popup area below another widget.- Add
Slider::clamp_to_range(bool): if set, clamp the incoming and outgoing values to the slider range. - Add:
ui.spacing(),ui.spacing_mut(),ui.visuals(),ui.visuals_mut(). - Add:
ctx.set_visuals(). - You can now control text wrapping with
Style::wrap. - Add
Grid::max_col_width.
Changed 🔧
- Text will now wrap at newlines, spaces, dashes, punctuation or in the middle of a words if necessary, in that order of priority.
- Widgets will now always line break at
\ncharacters. - Widgets will now more intelligently choose wether or not to wrap text.
mousehas been renamedpointereverywhere (to make it clear it includes touches too).- Most parts of
Responseare now methods, soif ui.button("…").clicked {is nowif ui.button("…").clicked() {. Response::activeis now gone. You can useresponse.dragged()orresponse.clicked()instead.- Backend: pointer (mouse/touch) position and buttons are now passed to egui in the event stream.
DragValue::rangeis now calledclamp_rangeand also clamps incoming values.- Renamed
TrianglestoMesh. - The tessellator now wraps the clip rectangle and mesh in
struct ClippedMesh(Rect, Mesh). Mesh::split_to_u16now returns a 16-bit indexedMesh16.
Fixed 🐛
- It is now possible to click widgets even when FPS is very low.
- Tessellator: handle sharp path corners better (switch to bevel instead of miter joints for > 90°).
0.8.0 - 2021-01-17 - Grid layout & new visual style
Added ⭐
- Added a simple grid layout (
Grid). - Added
ui.allocate_at_leastandui.allocate_exact_size. - Added function
InputState::key_down. - Added
Window::current_posto position a window.
Changed 🔧
- New simpler and sleeker look!
- Rename
PaintCmdtoShape. - Replace tuple
(Rect, Shape)with tuple-structClippedShape. - Rename feature
"serde"to"persistence". - Break out the modules
mathandpaintinto separate cratesemathandepaint.
Fixed 🐛
- Fixed a bug that would sometimes trigger a "Mismatching panels" panic in debug builds.
ImageandImageButtonwill no longer stretch to fill a justified layout.
0.7.0 - 2021-01-04
Added ⭐
- Add
ui.scroll_to_cursorandresponse.scroll_to_me(#81 by lucaspoffo). - Add
window.id(…)andarea.id(…)for overriding the defaultId.
Changed 🔧
- Renamed
SrgbatoColor32. - All color contructions now starts with
from_, e.g.Color32::from_rgb. - Renamed
FontFamily::VariableWidthtoFontFamily::Proportional. - Removed
pixels_per_pointfromFontDefinitions.
Fixed 🐛
RepaintSignalnow implementsSyncso it can be sent to a background thread.TextEditwidgets are now slightly larger to accommodate their frames.
Deprecated ☢️
- Deprecated
color::srgba.
0.6.0 - 2020-12-26
Added ⭐
- Turn off
Windowtitle bars withwindow.title_bar(false). ImageButton-ui.add(ImageButton::new(…)).ui.vertical_centeredandui.vertical_centered_justified.ui.allocate_painterhelper.- Mouse-over explanation to duplicate ID warning.
- You can now easily constrain egui to a portion of the screen using
RawInput::screen_rect. - You can now control the minimum and maixumum number of decimals to show in a
SliderorDragValue. - Add
egui::math::Rot2: rotation helper. Responsenow contains theIdof the widget it pertains to.ui.allocate_responsethat allocates space and checks for interactions.- Add
response.interact(sense), e.g. to check for clicks on labels.
Changed 🔧
ui.allocate_spacenow returns an(Id, Rect)tuple.Arc<Context>has been replaced withCtxRefeverywhere.- Slight tweak of the default
Styleand font sizes. SidePanel::leftandTopPanel::topnow takesimpl Hashas first argument.- A
Windowmay now cover an existingCentralPanel. ui.imagenow takesimpl Into<Vec2>as asizeargument.- Made some more fields of
RawInputoptional. SliderandDragValueuses fewer decimals by default. See the full precision by hovering over the value.egui::App: addedfn name(&self)andfn clear_color(&self).- Combo boxes has scroll bars when needed.
- Expand
Window+Resizecontainers to be large enough for last frames content ui.columns: Columns now defaults to justified top-to-down layouts.- Rename
Sense::nothing()toSense::hover(). - Replaced
parking_lotdependency withatomic_refcellby default.
Fixed 🐛
- The background for
CentralPanelwill now cover unused space too. ui.columns: Improve allocated size estimation.
Deprecated ☢️
RawInput::screen_size- useRawInput::screen_rectinstead.- left/centered/right column functions on
Ui. ui.interact_hoverandui.hovered.
0.5.0 - 2020-12-13
Added ⭐
- Emoji support: 1216 different emojis that work in any text.
- The Demo app comes with a Font Book to explore the available glyphs.
ui.horizontal_wrapped(|ui| …): Add widgets on a row but wrap atmax_size.ui.horizontal_wrapped_for_text: Likeui.horizontal_wrapped, but with spacing made for embedding text.ui.horizontal_for_text: Likeui.horizontal, but with spacing made for embedding text.egui::Layoutnow supports justified layouts where contents is also centered, right-aligned, etc.ui.allocate_ui(size, |ui| …): Easily create a child-Uiof a given size.SelectableLabel(ui.selectable_labelandui.selectable_value): A text-button that can be selected.ui.small_button: A smaller button that looks good embedded in text.ui.drag_angle_tau: For those who want to specify angles as fractions of τ (a full turn).- Add
Resize::id_sourceandScrollArea::id_sourceto let the user avoid Id clashes.
Changed 🔧
- New default font: Ubuntu-Light.
- Make it simpler to override fonts in
FontDefinitions. - Remove minimum button width.
- Refactor
egui::Layoutsubstantially, changing its interface. - Calling
on_hover_text/on_hover_uimultiple times will stack tooltips underneath the previous ones. - Text wrapping on labels, buttons, checkboxes and radio buttons is now based on the layout.
Removed 🔥
- Removed the
label!macro.
0.4.0 - 2020-11-28
Added ⭐
TextEditimprovements:- Much improved text editing, with better navigation and selection.
- Move focus between
TextEditwidgets with tab and shift-tab. - Undo edtis in a
TextEdit. - You can now check if a
TextEditlost keyboard focus withresponse.lost_focus. - Added
ui.text_edit_singlelineandui.text_edit_multiline.
- You can now debug why your
Uiis unexpectedly wide withui.style_mut().debug.show_expand_width = true;
Changed 🔧
- Pressing enter in a single-line
TextEditwill now surrender keyboard focus for it. - You must now be explicit when creating a
TextEditif you want it to be singeline or multiline. - Improved automatic
Idgeneration, makingIdclashes less likely. - egui now requires modifier key state from the integration
- Added, renamed and removed some keys in the
Keyenum. - Fixed incorrect text wrapping width on radio buttons
Fixed 🐛
- Fixed bug where a lost widget could still retain keyboard focus.
0.3.0 - 2020-11-07
Added ⭐
- Panels: you can now create panels using
SidePanel,TopPanelandCentralPanel. - You can now override the default egui fonts.
- Add ability to override text color with
visuals.override_text_color. - The demo now includes a simple drag-and-drop example.
- The demo app now has a slider to scale all of egui.
Changed 🔧
ui.horizontal(…)etc returnsResponse.- Refactored the interface for
egui::app::App. - Windows are now constrained to the screen.
Context::begin_frame()no longer returns aUi. Instead put your widgets into aSidePanel,TopPanel,CentralPanel,WindoworArea.Context::end_frame()now returns shapes that need to be converted to triangles withContext::tessellate().- Anti-aliasing is now off by default in debug builds.
Removed 🔥
- You can no longer throw windows.
Fixed 🐛
- Fix a bug where some regions would slowly grow for non-integral scales (
pixels_per_point).
0.2.0 - 2020-10-10
- Color picker
- Unicode characters in labels (limited by what the default font supports)
- Simple drop-down combo box menu
- Logarithmic sliders
- Optimization: coarse culling in the tessellator
- CHANGED: switch argument order of
ui.checkboxandui.radio
0.1.4 - 2020-09-08
This is when I started the CHANGELOG.md, after almost two years of development. Better late than never.
- Widgets: label, text button, hyperlink, checkbox, radio button, slider, draggable value, text editing
- Layouts: horizontal, vertical, columns
- Text input: very basic, multiline, copy/paste
- Windows: move, resize, name, minimize and close. Automatically sized and positioned.
- Regions: resizing, vertical scrolling, collapsing headers (sections)
- Rendering: Anti-aliased rendering of lines, circles, text and convex polygons.
- Tooltips on hover