Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update rust crate egui to 0.31 #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 23, 2023

This PR contains the following updates:

Package Type Update Change
egui dependencies minor 0.26 -> 0.31

Release Notes

emilk/egui (egui)

v0.31.0

Compare Source

Highlights ✨
Scene container

This release adds the Scene container to egui. It is a pannable, zoomable canvas that can contain Widgets and child Uis.
This will make it easier to e.g. implement a graph editor.

scene

Clearer, pixel perfect rendering

The tessellator has been updated for improved rendering quality and better performance. It will produce fewer vertices
and shapes will have less overdraw. We've also defined what CornerRadius (previously Rounding) means.

We've also added a tessellator test to the demo app, where you can play around with different
values to see what's produced:

tessellator-test.mp4

Check the PR for more details.

CornerRadius, Margin, Shadow size reduction

In order to pave the path for more complex and customizable styling solutions, we've reduced the size of
CornerRadius, Margin and Shadow values to i8 and u8.

Migration guide
  • Add a StrokeKind to all your Painter::rect calls #​5648
  • StrokeKind::default was removed, since the 'normal' value depends on the context #​5658
    • You probably want to use StrokeKind::Inside when drawing rectangles
    • You probably want to use StrokeKind::Middle when drawing open paths
  • Rename Rounding to CornerRadius #​5673
  • CornerRadius, Margin and Shadow have been updated to use i8 and u8 #​5563, #​5567, #​5568
    • Remove the .0 from your values
    • Cast dynamic values with as i8 / as u8 or as _ if you want Rust to infer the type
      • Rust will do a 'saturating' cast, so if your f32 value is bigger than 127 it will be clamped to 127
  • RectShape parameters changed #​5565
    • Prefer to use the builder methods to create it instead of initializing it directly
  • Frame now takes the Stroke width into account for its sizing, so check all views of your app to make sure they still look right.
    Read the PR for more info.
⭐ Added
🔧 Changed
🔥 Removed
🐛 Fixed
🚀 Performance

v0.30.0

Compare Source

✨ Highlights
egui_kittest

This release welcomes a new crate to the family: egui_kittest.
egui_kittest is a testing framework for egui, allowing you to test both automation (simulated clicks and other events),
and also do screenshot testing (useful for regression tests).
egui_kittest is built using kittest, which is a general GUI testing framework that aims to work with any Rust GUI (not just egui!).
kittest uses the accessibility library AccessKit for automatation and to query the widget tree.

kittest and egui_kittest are written by @​lucasmerlin.

Here's a quick example of how to use egui_kittest to test a checkbox:

use egui::accesskit::Toggled;
use egui_kittest::{Harness, kittest::Queryable};

fn main() {
    let mut checked = false;
    let app = |ui: &mut egui::Ui| {
        ui.checkbox(&mut checked, "Check me!");
    };

    let mut harness = egui_kittest::Harness::new_ui(app);

    let checkbox = harness.get_by_label("Check me!");
    assert_eq!(checkbox.toggled(), Some(Toggled::False));
    checkbox.click();

    harness.run();

    let checkbox = harness.get_by_label("Check me!");
    assert_eq!(checkbox.toggled(), Some(Toggled::True));

    // You can even render the ui and do image snapshot tests
    #[cfg(all(feature = "wgpu", feature = "snapshot"))]
    harness.wgpu_snapshot("readme_example");
}
⭐ Added
🔧 Changed
🐛 Fixed

v0.29.1

Compare Source

v0.29.0

Compare Source

✨ Highlights

This release adds initial support for multi-pass layout, which is a tool to circumvent a common limitation of immediate mode.
You can use the new UiBuilder::sizing_pass (#​4969) to instruct the Ui and widgets to shrink to their minimum size, then store that size.
Then call the new Context::request_discard (#​5059) to discard the visual output and do another pass immediately after the current finishes.
Together, this allows more advanced layouts that is normally not possible in immediate mode.
So far this is only used by egui::Grid to hide the "first-frame jitters" that would sometimes happen before, but 3rd party libraries can also use it to do much more advanced things.

There is also a new UiBuilder for more flexible construction of Uis (#​4969).
By specifying a sense for the Ui you can make it respond to clicks and drags, reading the result with the new Ui::response (#​5054).
Among other things, you can use this to create buttons that contain arbitrary widgets.

0.29 also adds improve support for automatic switching between light and dark mode.
You can now set up a custom Style for both dark and light mode, and have egui follow the system preference (#​4744 #​4860).

There also has been several small improvements to the look of egui:

  • Fix vertical centering of text (e.g. in buttons) (#​5117)
  • Sharper rendering of lines and outlines (#​4943)
  • Nicer looking text selection, especially in light mode (#​5017)
The new text selection
New text selection in light mode New text selection in dark mode
What text selection used to look like
Old text selection in light mode Old text selection in dark mode
🧳 Migration
  • id_source is now called id_salt everywhere (#​5025)
  • Ui::new now takes a UiBuilder (#​4969)
  • Deprecated (replaced with UiBuilder):
    • ui.add_visible_ui
    • ui.allocate_ui_at_rect
    • ui.child_ui
    • ui.child_ui_with_id_source
    • ui.push_stack_info
⭐ Added
🚀 Performance
🔧 Changed
🐛 Fixed

v0.28.1

Compare Source

⭐ Added
🔧 Changed
🐛 Fixed

v0.28.0

Compare Source

✨ Highlights
🧳 Migration
  • Update MSRV to 1.76 (#​4411)
  • The wrap/truncate functions on Label/Button/ComboBox no longer take bools as arguments. Use .wrap_mode(…) instead for more fine control (#​4556)
  • Style::wrap has been deprecated in favor of Style::wrap_mode (#​4556)
  • Ui::new and ui.child_ui now takes a new parameter for the UiStack (#​4588)
  • The extra_asserts and extra_debug_asserts feature flags have been removed (#​4478)
  • Remove Event::Scroll and handle it in egui. Use Event::MouseWheel instead (#​4524)
  • Event::Zoom is no longer emitted on ctrl+scroll. Use InputState::smooth_scroll_delta instead (#​4524)
  • ui.set_enabled and set_visbile have been deprecated (#​4614)
  • DragValue::clamp_range renamed to range ((#​4728)
⭐ Added
🔧 Changed
🐛 Fixed

v0.27.2

Compare Source

🐛 Fixed
  • Fix tooltips for non-interactive widgets #​4291
  • Fix problem clicking the edge of a TextEdit #​4272
  • Fix: Response::clicked_elsewhere takes clip rect into account #​4274
  • Fix incorrect Response::interact_rect for Area/Window #​4273
⭐ Added

v0.27.1

Compare Source

🐛 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

v0.27.0

Compare Source

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
🔧 Changed
🐛 Fixed

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.24.0 fix(deps): update rust crate egui to 0.24.1 Nov 30, 2023
@renovate renovate bot force-pushed the renovate/egui-0.x branch from 8a163bd to fa68cf7 Compare November 30, 2023 19:55
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.24.1 fix(deps): update rust crate egui to 0.25.0 Jan 8, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch from fa68cf7 to 577fc92 Compare January 8, 2024 11:44
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.25.0 fix(deps): update rust crate egui to 0.26.0 Feb 5, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch from 577fc92 to 2615f58 Compare February 5, 2024 18:16
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.26.0 fix(deps): update rust crate egui to 0.26.1 Feb 11, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch 2 times, most recently from 76b2e90 to 9bf7bdd Compare February 14, 2024 13:04
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.26.1 fix(deps): update rust crate egui to 0.26.2 Feb 14, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch from 9bf7bdd to bdf2407 Compare March 24, 2024 17:38
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.26.2 fix(deps): update rust crate egui to 0.26.2 - autoclosed Mar 25, 2024
@renovate renovate bot closed this Mar 25, 2024
@renovate renovate bot deleted the renovate/egui-0.x branch March 25, 2024 07:18
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.26.2 - autoclosed fix(deps): update rust crate egui to 0.26.2 Mar 26, 2024
@renovate renovate bot reopened this Mar 26, 2024
@renovate renovate bot restored the renovate/egui-0.x branch March 26, 2024 18:46
@renovate renovate bot force-pushed the renovate/egui-0.x branch from bdf2407 to 0de4124 Compare March 26, 2024 18:46
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.26.2 fix(deps): update rust crate egui to 0.27 Mar 26, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch from 0de4124 to f35edab Compare May 1, 2024 10:29
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.27 fix(deps): update rust crate egui to 0.27.2 May 1, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch from f35edab to ab72f18 Compare May 5, 2024 10:47
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.27.2 fix(deps): update rust crate egui to 0.27 May 5, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch from ab72f18 to c635a38 Compare July 29, 2024 06:16
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.27 fix(deps): update rust crate egui to 0.28 Jul 29, 2024
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.28 fix(deps): update rust crate egui to 0.29 Sep 26, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch from c635a38 to ee2b692 Compare September 26, 2024 15:59
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.29 fix(deps): update rust crate egui to 0.30 Dec 16, 2024
@renovate renovate bot force-pushed the renovate/egui-0.x branch from ee2b692 to d9ac72a Compare December 16, 2024 20:10
@renovate renovate bot force-pushed the renovate/egui-0.x branch from d9ac72a to 33b7724 Compare February 4, 2025 16:42
@renovate renovate bot changed the title fix(deps): update rust crate egui to 0.30 fix(deps): update rust crate egui to 0.31 Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants