Skip to content

Commit

Permalink
Release 0.31.0 - Scene container, improved rendering quality
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Feb 4, 2025
1 parent d97cd82 commit 5c372a7
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 31 deletions.
82 changes: 82 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,88 @@ This file is updated upon each release.
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script.


## 0.31.0 - 2025-02-04 - Scene container, improved rendering quality

### Highlights ✨

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

![image](https://github.com/user-attachments/assets/b37d56ef-f6ef-46be-bb99-6eb25b6efca9)

#### 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](https://www.egui.rs/), where you can play around with different
values to see what's produced:


https://github.com/user-attachments/assets/adf55e3b-fb48-4df0-aaa2-150ee3163684


Check the [PR](https://github.com/emilk/egui/pull/5669) 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](https://github.com/emilk/egui/pull/5648)
- `StrokeKind::default` was removed, since the 'normal' value depends on the context [#5658](https://github.com/emilk/egui/pull/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](https://github.com/emilk/egui/pull/5673)
- `CornerRadius`, `Margin` and `Shadow` have been updated to use `i8` and `u8` [#5563](https://github.com/emilk/egui/pull/5563), [#5567](https://github.com/emilk/egui/pull/5567), [#5568](https://github.com/emilk/egui/pull/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](https://github.com/emilk/egui/pull/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](https://github.com/emilk/egui/pull/5575) for more info.

### ⭐ Added
* Add `egui::Scene` for panning/zooming a `Ui` [#5505](https://github.com/emilk/egui/pull/5505) by [@grtlr](https://github.com/grtlr)
* Animated WebP support [#5470](https://github.com/emilk/egui/pull/5470) by [@Aely0](https://github.com/Aely0)
* Improve tessellation quality [#5669](https://github.com/emilk/egui/pull/5669) by [@emilk](https://github.com/emilk)
* Add `OutputCommand` for copying text and opening URL:s [#5532](https://github.com/emilk/egui/pull/5532) by [@emilk](https://github.com/emilk)
* Add `Context::copy_image` [#5533](https://github.com/emilk/egui/pull/5533) by [@emilk](https://github.com/emilk)
* Add `WidgetType::Image` and `Image::alt_text` [#5534](https://github.com/emilk/egui/pull/5534) by [@lucasmerlin](https://github.com/lucasmerlin)
* Add `epaint::Brush` for controlling `RectShape` texturing [#5565](https://github.com/emilk/egui/pull/5565) by [@emilk](https://github.com/emilk)
* Implement `nohash_hasher::IsEnabled` for `Id` [#5628](https://github.com/emilk/egui/pull/5628) by [@emilk](https://github.com/emilk)
* Add keys for `!`, `{`, `}` [#5548](https://github.com/emilk/egui/pull/5548) by [@Its-Just-Nans](https://github.com/Its-Just-Nans)
* Add `RectShape::stroke_kind ` to control if stroke is inside/outside/centered [#5647](https://github.com/emilk/egui/pull/5647) by [@emilk](https://github.com/emilk)

### 🔧 Changed
* ⚠️ `Frame` now includes stroke width as part of padding [#5575](https://github.com/emilk/egui/pull/5575) by [@emilk](https://github.com/emilk)
* Rename `Rounding` to `CornerRadius` [#5673](https://github.com/emilk/egui/pull/5673) by [@emilk](https://github.com/emilk)
* Require a `StrokeKind` when painting rectangles with strokes [#5648](https://github.com/emilk/egui/pull/5648) by [@emilk](https://github.com/emilk)
* Round widget coordinates to even multiple of 1/32 [#5517](https://github.com/emilk/egui/pull/5517) by [@emilk](https://github.com/emilk)
* Make all lines and rectangles crisp [#5518](https://github.com/emilk/egui/pull/5518) by [@emilk](https://github.com/emilk)
* Tweak window resize handles [#5524](https://github.com/emilk/egui/pull/5524) by [@emilk](https://github.com/emilk)

### 🔥 Removed
* Remove `egui::special_emojis::TWITTER` [#5622](https://github.com/emilk/egui/pull/5622) by [@emilk](https://github.com/emilk)
* Remove `StrokeKind::default` [#5658](https://github.com/emilk/egui/pull/5658) by [@emilk](https://github.com/emilk)

### 🐛 Fixed
* Use correct minimum version of `profiling` crate [#5494](https://github.com/emilk/egui/pull/5494) by [@lucasmerlin](https://github.com/lucasmerlin)
* Fix interactive widgets sometimes being incorrectly marked as hovered [#5523](https://github.com/emilk/egui/pull/5523) by [@emilk](https://github.com/emilk)
* Fix panic due to non-total ordering in `Area::compare_order()` [#5569](https://github.com/emilk/egui/pull/5569) by [@HactarCE](https://github.com/HactarCE)
* Fix hovering through custom menu button [#5555](https://github.com/emilk/egui/pull/5555) by [@M4tthewDE](https://github.com/M4tthewDE)

### 🚀 Performance
* Use `u8` in `CornerRadius`, and introduce `CornerRadiusF32` [#5563](https://github.com/emilk/egui/pull/5563) by [@emilk](https://github.com/emilk)
* Store `Margin` using `i8` to reduce its size [#5567](https://github.com/emilk/egui/pull/5567) by [@emilk](https://github.com/emilk)
* Shrink size of `Shadow` by using `i8/u8` instead of `f32` [#5568](https://github.com/emilk/egui/pull/5568) by [@emilk](https://github.com/emilk)
* Avoid allocations for loader cache lookup [#5584](https://github.com/emilk/egui/pull/5584) by [@mineichen](https://github.com/mineichen)
* Use bitfield instead of bools in `Response` and `Sense` [#5556](https://github.com/emilk/egui/pull/5556) by [@polwel](https://github.com/polwel)


## 0.30.0 - 2024-12-16 - Modals and better layer support

### ✨ Highlights
Expand Down
30 changes: 15 additions & 15 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"

[[package]]
name = "ecolor"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"bytemuck",
"cint",
Expand All @@ -1209,7 +1209,7 @@ dependencies = [

[[package]]
name = "eframe"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"ahash",
"bytemuck",
Expand Down Expand Up @@ -1249,7 +1249,7 @@ dependencies = [

[[package]]
name = "egui"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"accesskit",
"ahash",
Expand All @@ -1267,7 +1267,7 @@ dependencies = [

[[package]]
name = "egui-wgpu"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -1285,7 +1285,7 @@ dependencies = [

[[package]]
name = "egui-winit"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"accesskit_winit",
"ahash",
Expand All @@ -1306,7 +1306,7 @@ dependencies = [

[[package]]
name = "egui_demo_app"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"bytemuck",
"chrono",
Expand All @@ -1333,7 +1333,7 @@ dependencies = [

[[package]]
name = "egui_demo_lib"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"chrono",
"criterion",
Expand All @@ -1347,7 +1347,7 @@ dependencies = [

[[package]]
name = "egui_extras"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"ahash",
"chrono",
Expand All @@ -1366,7 +1366,7 @@ dependencies = [

[[package]]
name = "egui_glow"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -1386,7 +1386,7 @@ dependencies = [

[[package]]
name = "egui_kittest"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"dify",
"document-features",
Expand Down Expand Up @@ -1421,7 +1421,7 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"

[[package]]
name = "emath"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"bytemuck",
"document-features",
Expand Down Expand Up @@ -1512,7 +1512,7 @@ dependencies = [

[[package]]
name = "epaint"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"ab_glyph",
"ahash",
Expand All @@ -1533,7 +1533,7 @@ dependencies = [

[[package]]
name = "epaint_default_fonts"
version = "0.30.0"
version = "0.31.0"

[[package]]
name = "equivalent"
Expand Down Expand Up @@ -3099,7 +3099,7 @@ checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"

[[package]]
name = "popups"
version = "0.30.0"
version = "0.31.0"
dependencies = [
"eframe",
"env_logger",
Expand Down Expand Up @@ -5105,7 +5105,7 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"

[[package]]
name = "xtask"
version = "0.30.0"
version = "0.31.0"

[[package]]
name = "yaml-rust"
Expand Down
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ members = [
edition = "2021"
license = "MIT OR Apache-2.0"
rust-version = "1.81"
version = "0.30.0"
version = "0.31.0"


[profile.release]
Expand Down Expand Up @@ -55,18 +55,18 @@ opt-level = 2


[workspace.dependencies]
emath = { version = "0.30.0", path = "crates/emath", default-features = false }
ecolor = { version = "0.30.0", path = "crates/ecolor", default-features = false }
epaint = { version = "0.30.0", path = "crates/epaint", default-features = false }
epaint_default_fonts = { version = "0.30.0", path = "crates/epaint_default_fonts" }
egui = { version = "0.30.0", path = "crates/egui", default-features = false }
egui-winit = { version = "0.30.0", path = "crates/egui-winit", default-features = false }
egui_extras = { version = "0.30.0", path = "crates/egui_extras", default-features = false }
egui-wgpu = { version = "0.30.0", path = "crates/egui-wgpu", default-features = false }
egui_demo_lib = { version = "0.30.0", path = "crates/egui_demo_lib", default-features = false }
egui_glow = { version = "0.30.0", path = "crates/egui_glow", default-features = false }
egui_kittest = { version = "0.30.0", path = "crates/egui_kittest", default-features = false }
eframe = { version = "0.30.0", path = "crates/eframe", default-features = false }
emath = { version = "0.31.0", path = "crates/emath", default-features = false }
ecolor = { version = "0.31.0", path = "crates/ecolor", default-features = false }
epaint = { version = "0.31.0", path = "crates/epaint", default-features = false }
epaint_default_fonts = { version = "0.31.0", path = "crates/epaint_default_fonts" }
egui = { version = "0.31.0", path = "crates/egui", default-features = false }
egui-winit = { version = "0.31.0", path = "crates/egui-winit", default-features = false }
egui_extras = { version = "0.31.0", path = "crates/egui_extras", default-features = false }
egui-wgpu = { version = "0.31.0", path = "crates/egui-wgpu", default-features = false }
egui_demo_lib = { version = "0.31.0", path = "crates/egui_demo_lib", default-features = false }
egui_glow = { version = "0.31.0", path = "crates/egui_glow", default-features = false }
egui_kittest = { version = "0.31.0", path = "crates/egui_kittest", default-features = false }
eframe = { version = "0.31.0", path = "crates/eframe", default-features = false }

ahash = { version = "0.8.11", default-features = false, features = [
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead
Expand Down
6 changes: 3 additions & 3 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ We don't update the MSRV in a patch release, unless we really, really need to.

## Preparation
* [ ] run `scripts/generate_example_screenshots.sh` if needed
* [ ] write a short release note that fits in a tweet
* [ ] write a short release note that fits in a bluesky post
* [ ] record gif for `CHANGELOG.md` release note (and later bluesky post)
* [ ] update changelogs using `scripts/generate_changelog.py --version 0.x.0 --write`
* [ ] bump version numbers in workspace `Cargo.toml`
Expand All @@ -55,9 +55,9 @@ We don't update the MSRV in a patch release, unless we really, really need to.
I usually do this all on the `master` branch, but doing it in a release branch is also fine, as long as you remember to merge it into `master` later.

* [ ] Run `typos`
* [ ] `git commit -m 'Release 0.x.0 - summary'`
* [ ] `git commit -m 'Release 0.x.0 - <release title>'`
* [ ] `cargo publish` (see below)
* [ ] `git tag -a 0.x.0 -m 'Release 0.x.0 - summary'`
* [ ] `git tag -a 0.x.0 -m 'Release 0.x.0 - <release title>'`
* [ ] `git pull --tags ; git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force ; git push --tags`
* [ ] merge release PR or push to `master`
* [ ] check that CI is green
Expand Down
4 changes: 4 additions & 0 deletions crates/ecolor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This file is updated upon each release.
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script.


## 0.31.0 - 2025-02-04
* Add `Color32::CYAN` and `Color32::MAGENTA` [#5663](https://github.com/emilk/egui/pull/5663) by [@juancampa](https://github.com/juancampa)


## 0.30.0 - 2024-12-16
* Use boxed slice for lookup table to avoid stack overflow [#5212](https://github.com/emilk/egui/pull/5212) by [@YgorSouza](https://github.com/YgorSouza)
* Add `Color32::mul` [#5437](https://github.com/emilk/egui/pull/5437) by [@emilk](https://github.com/emilk)
Expand Down
8 changes: 8 additions & 0 deletions crates/eframe/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ This file is updated upon each release.
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script.


## 0.31.0 - 2025-02-04
* Web: Fix incorrect scale when moving to screen with new DPI [#5631](https://github.com/emilk/egui/pull/5631) by [@emilk](https://github.com/emilk)
* Re-enable IME support on Linux [#5198](https://github.com/emilk/egui/pull/5198) by [@YgorSouza](https://github.com/YgorSouza)
* Serialize window maximized state in `WindowSettings` [#5554](https://github.com/emilk/egui/pull/5554) by [@landaire](https://github.com/landaire)
* Save state on suspend on Android and iOS [#5601](https://github.com/emilk/egui/pull/5601) by [@Pandicon](https://github.com/Pandicon)
* Eframe web: forward cmd-S/O to egui app (stop default browser action) [#5655](https://github.com/emilk/egui/pull/5655) by [@emilk](https://github.com/emilk)


## 0.30.0 - 2024-12-16 - Android support
NOTE: you now need to enable the `wayland` or `x11` features to get Linux support, including getting it to work on most CI systems.

Expand Down
6 changes: 6 additions & 0 deletions crates/egui-wgpu/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ This file is updated upon each release.
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script.


## 0.31.0 - 2025-02-04
* Upgrade to wgpu 24 [#5610](https://github.com/emilk/egui/pull/5610) by [@torokati44](https://github.com/torokati44)
* Extend `WgpuSetup`, `egui_kittest` now prefers software rasterizers for testing [#5506](https://github.com/emilk/egui/pull/5506) by [@Wumpf](https://github.com/Wumpf)
* Wgpu resources are no longer wrapped in `Arc` (since they are now `Clone`) [#5612](https://github.com/emilk/egui/pull/5612) by [@Wumpf](https://github.com/Wumpf)


## 0.30.0 - 2024-12-16
* Fix docs.rs build [#5204](https://github.com/emilk/egui/pull/5204) by [@lucasmerlin](https://github.com/lucasmerlin)
* Free textures after submitting queue instead of before with wgpu renderer [#5226](https://github.com/emilk/egui/pull/5226) by [@Rusty-Cube](https://github.com/Rusty-Cube)
Expand Down
5 changes: 5 additions & 0 deletions crates/egui-winit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ This file is updated upon each release.
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script.


## 0.31.0 - 2025-02-04
* Re-enable IME support on Linux [#5198](https://github.com/emilk/egui/pull/5198) by [@YgorSouza](https://github.com/YgorSouza)
* Update to winit 0.30.7 [#5516](https://github.com/emilk/egui/pull/5516) by [@emilk](https://github.com/emilk)


## 0.30.0 - 2024-12-16
* iOS: Support putting UI next to the dynamic island [#5211](https://github.com/emilk/egui/pull/5211) by [@frederik-uni](https://github.com/frederik-uni)
* Remove implicit `accesskit_winit` feature [#5316](https://github.com/emilk/egui/pull/5316) by [@waywardmonkeys](https://github.com/waywardmonkeys)
Expand Down
6 changes: 6 additions & 0 deletions crates/egui_extras/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ This file is updated upon each release.
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script.


## 0.31.0 - 2025-02-04
* Animated WebP support [#5470](https://github.com/emilk/egui/pull/5470), [#5586](https://github.com/emilk/egui/pull/5586) by [@Aely0](https://github.com/Aely0)
* Make image extension check case-insensitive [#5501](https://github.com/emilk/egui/pull/5501) by [@RyanBluth](https://github.com/RyanBluth)
* Avoid allocations for loader cache lookup [#5584](https://github.com/emilk/egui/pull/5584) by [@mineichen](https://github.com/mineichen)


## 0.30.0 - 2024-12-16
* Use `Table::id_salt` on `ScrollArea` [#5282](https://github.com/emilk/egui/pull/5282) by [@jwhear](https://github.com/jwhear)
* Use proper `image` crate URI and MIME support detection [#5324](https://github.com/emilk/egui/pull/5324) by [@xangelix](https://github.com/xangelix)
Expand Down
4 changes: 4 additions & 0 deletions crates/egui_glow/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Changes since the last release can be found at <https://github.com/emilk/egui/co



## 0.31.0 - 2025-02-04
Nothing new


## 0.30.0 - 2024-12-16
* Update glow to 0.16 [#5395](https://github.com/emilk/egui/pull/5395) by [@sagudev](https://github.com/sagudev)

Expand Down
12 changes: 12 additions & 0 deletions crates/egui_kittest/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ This file is updated upon each release.
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script.


## 0.31.0 - 2025-02-04
### ⭐ Added
* Add `Harness::new_eframe` and `TestRenderer` trait [#5539](https://github.com/emilk/egui/pull/5539) by [@lucasmerlin](https://github.com/lucasmerlin)
* Change `Harness::run` to run until no more repaints are requested [#5580](https://github.com/emilk/egui/pull/5580) by [@lucasmerlin](https://github.com/lucasmerlin)
* Add `SnapshotResults` struct to `egui_kittest` [#5672](https://github.com/emilk/egui/pull/5672) by [@lucasmerlin](https://github.com/lucasmerlin)

### 🔧 Changed
* Extend `WgpuSetup`, `egui_kittest` now prefers software rasterizers for testing [#5506](https://github.com/emilk/egui/pull/5506) by [@Wumpf](https://github.com/Wumpf)
* Write `.old.png` files when updating images [#5578](https://github.com/emilk/egui/pull/5578) by [@emilk](https://github.com/emilk)
* Succeed and keep going when `UPDATE_SNAPSHOTS` is set [#5649](https://github.com/emilk/egui/pull/5649) by [@emilk](https://github.com/emilk)


## 0.30.0 - 2024-12-16 - Initial relrease
* Support for egui 0.30.0
* Automate clicks and text input
Expand Down
Loading

0 comments on commit 5c372a7

Please sign in to comment.