๐Ÿ–Œ 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 amd RichText::family and the new FontId.
      • 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).
    • Plot:
      • Added Plot::x_axis_formatter and Plot::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).
    • ๐Ÿ’ป 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 the InputState and a convenience method InputState::consume_key for shortcuts or hotkeys (#1212).
    • ๐Ÿ’ป Added Ui::add_visible and Ui::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() and ctx.tessellation_options() (#1175).
    • Added Response::on_hover_text_at_pointer as a convenience akin to Response::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 and Context::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 and Ui::input now locks a mutex. This can lead to a dead-lock is used in an if 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 to Context (#1050).
    • ๐Ÿ‘ฏ Context can now be cloned and stored between frames (#1050).
    • ๐Ÿ’ป Renamed Ui::visible to Ui::is_visible.
    • Split Event::Text into Event::Text and Event::Paste (#1058).
    • Replaced Style::body_text_style with more generic Style::text_styles (#1154).
    • ๐Ÿ’… TextStyle is no longer Copy (#1154).
    • ๐Ÿ’… Replaced TextEdit::text_style with TextEdit::font (#1154).
    • Plot::highlight now takes a bool argument (#1159).
    • ScrollArea::show now returns a ScrollAreaOutput, so you might need to add .inner after the call to it (#1166).
    • Replaced corner_radius: f32 with rounding: Rounding, allowing per-corner rounding settings (#1206).
    • Replaced Frame's margin: Vec2 with margin: Margin, allowing for different margins on opposing sides (#1219).
    • Renamed Plot::custom_label_func to Plot::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 by min_scrolled_width/min_scrolled_height (1255).
    • For integrations:
      • Output has now been renamed PlatformOutput and Context::run now returns the new FullOutput (#1292).
      • FontImage has been replaced by TexturesDelta (found in FullOutput), 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 ๐Ÿ™