๐ egui v0.17.0 Release Notes
Release Date: 2022-02-22 // about 2 years ago-
โ Added โญ
- Much improved font selection (#1154):
- You can now select any font size and family using
RichText::size
amdRichText::family
and the newFontId
. - Easily change text styles with
Style::text_styles
. - Added
Ui::text_style_height
. - Added
TextStyle::resolve
. - Made the v-align and scale of user fonts tweakable (#1241).
- You can now select any font size and family using
- Plot:
- Added
Plot::x_axis_formatter
andPlot::y_axis_formatter
for custom axis labels (#1130). - Added
Plot::allow_boxed_zoom()
,Plot::boxed_zoom_pointer()
for boxed zooming on plots (#1188). - Added plot pointer coordinates with
Plot::coordinates_formatter
. (#1235). - Added linked axis support for plots via
plot::LinkedAxisGroup
(#1184).
- Added
- ๐ป
Context::load_texture
to convert an image into a texture which can be displayed using e.g.ui.image(texture, size)
(#1110). - ๐
Ui::input_mut
to modify how subsequent widgets see theInputState
and a convenience methodInputState::consume_key
for shortcuts or hotkeys (#1212). - ๐ป Added
Ui::add_visible
andUi::add_visible_ui
. - โ Added
CollapsingHeader::icon
to override the default open/close icon using a custom function. (1147). - โ Added
ui.data()
,ctx.data()
,ctx.options()
andctx.tessellation_options()
(#1175). - Added
Response::on_hover_text_at_pointer
as a convenience akin toResponse::on_hover_text
(1179). - โ Opt-in dependency on
tracing
crate for logging warnings (#1192). - โ Added
ui.weak(text)
. - โ Added
Slider::step_by
(1225). - Added
Context::move_to_top
andContext::top_most_layer
for managing the layer on the top (#1242). - ๐ Support a subset of macOS' emacs input field keybindings in
TextEdit
(#1243). - โ Added ability to scroll an UI into view without specifying an alignment (1247).
- Added
Ui::scroll_to_rect
(1252).
๐ Changed ๐ง
- ๐ โ ๏ธ
Context::input
andUi::input
now locks a mutex. This can lead to a dead-lock is used in anif let
binding!if let Some(pos) = ui.input().pointer.latest_pos()
and similar must now be rewritten on two lines.- Search for this problem in your code using the regex
if let .*input
.
- ๐ Better contrast in the default light mode style (#1238).
- ๐ Renamed
CtxRef
toContext
(#1050). - ๐ฏ
Context
can now be cloned and stored between frames (#1050). - ๐ป Renamed
Ui::visible
toUi::is_visible
. - Split
Event::Text
intoEvent::Text
andEvent::Paste
(#1058). - Replaced
Style::body_text_style
with more genericStyle::text_styles
(#1154). - ๐
TextStyle
is no longerCopy
(#1154). - ๐
Replaced
TextEdit::text_style
withTextEdit::font
(#1154). Plot::highlight
now takes abool
argument (#1159).ScrollArea::show
now returns aScrollAreaOutput
, so you might need to add.inner
after the call to it (#1166).- Replaced
corner_radius: f32
withrounding: Rounding
, allowing per-corner rounding settings (#1206). - Replaced Frame's
margin: Vec2
withmargin: Margin
, allowing for different margins on opposing sides (#1219). - Renamed
Plot::custom_label_func
toPlot::label_formatter
(#1235). Areas::layer_id_at
ignores non-interatable layers (i.e. Tooltips) (#1240).ScrollArea
:s will not shrink below a certain minimum size, set bymin_scrolled_width/min_scrolled_height
(1255).- For integrations:
Output
has now been renamedPlatformOutput
andContext::run
now returns the newFullOutput
(#1292).FontImage
has been replaced byTexturesDelta
(found inFullOutput
), describing what textures were loaded and freed each frame (#1110).- The painter must support partial texture updates (#1149).
- Added
RawInput::max_texture_side
which should be filled in with e.g.GL_MAX_TEXTURE_SIZE
(#1154).
๐ Fixed ๐
- Plot
Orientation
was not public, although fields using this type were (#1130). - Context menus now respects the theme (#1043).
- Calling
Context::set_pixels_per_point
before the first frame will now work. - Tooltips that don't fit the window don't flicker anymore (#1240).
- Scroll areas now follow text cursor (#1252).
- Slider: correctly respond with drag and focus events when interacting with the value directly (1270).
Contributors ๐
- Much improved font selection (#1154):