Skip to content

Commit 59d7183

Browse files
committed
Release 0.29.0 - Multipass, UiBuilder, & visual improvements
1 parent dae1979 commit 59d7183

File tree

13 files changed

+255
-42
lines changed

13 files changed

+255
-42
lines changed

CHANGELOG.md

+99
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,105 @@ This file is updated upon each release.
77
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.
88

99

10+
## 0.29.0 - 2024-09-26 - Multipass, `UiBuilder`, & visual improvements
11+
### ✨ Highlights
12+
This release adds initial support for multi-pass layout, which is a tool to circumvent [a common limitation of immediate mode](https://github.com/emilk/egui#layout).
13+
You can use the new `UiBuilder::sizing_pass` ([#4969](https://github.com/emilk/egui/pull/4969)) to instruct the `Ui` and widgets to shrink to their minimum size, then store that size.
14+
Then call the new `Context::request_discard` ([#5059](https://github.com/emilk/egui/pull/5059)) to discard the visual output and do another _pass_ immediately after the current finishes.
15+
Together, this allows more advanced layouts that is normally not possible in immediate mode.
16+
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.
17+
18+
There is also a new `UiBuilder` for more flexible construction of `Ui`s ([#4969](https://github.com/emilk/egui/pull/4969)).
19+
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](https://github.com/emilk/egui/pull/5054)).
20+
Among other things, you can use this to create buttons that contain arbitrary widgets.
21+
22+
0.29 also adds improve support for automatic switching between light and dark mode.
23+
You can now set up a custom `Style` for both dark and light mode, and have egui follow the system preference ([#4744](https://github.com/emilk/egui/pull/4744) [#4860](https://github.com/emilk/egui/pull/4860)).
24+
25+
There also has been several small improvements to the look of egui:
26+
* Fix vertical centering of text (e.g. in buttons) ([#5117](https://github.com/emilk/egui/pull/5117))
27+
* Sharper rendering of lines and outlines ([#4943](https://github.com/emilk/egui/pull/4943))
28+
* Nicer looking text selection, especially in light mode ([#5017](https://github.com/emilk/egui/pull/5017))
29+
30+
#### The new text selection
31+
<img width="198" alt="New text selection in light mode" src="https://github.com/user-attachments/assets/bd342946-299c-44ab-bc2d-2aa8ddbca8eb">
32+
<img width="187" alt="New text selection in dark mode" src="https://github.com/user-attachments/assets/352bed32-5150-49b9-a9f9-c7679a0d30b2">
33+
34+
35+
#### What text selection used to look like
36+
<img width="143" alt="Old text selection in light mode" src="https://github.com/user-attachments/assets/f3cbd798-cfed-4ad4-aa3a-d7480efcfa3c">
37+
<img width="143" alt="Old text selection in dark mode" src="https://github.com/user-attachments/assets/9925d18d-da82-4a44-8a98-ea6857ecc14f">
38+
39+
### 🧳 Migration
40+
* `id_source` is now called `id_salt` everywhere ([#5025](https://github.com/emilk/egui/pull/5025))
41+
* `Ui::new` now takes a `UiBuilder` ([#4969](https://github.com/emilk/egui/pull/4969))
42+
* Deprecated (replaced with `UiBuilder`):
43+
* `ui.add_visible_ui`
44+
* `ui.allocate_ui_at_rect`
45+
* `ui.child_ui`
46+
* `ui.child_ui_with_id_source`
47+
* `ui.push_stack_info`
48+
49+
### ⭐ Added
50+
* Create a `UiBuilder` for building `Ui`s [#4969](https://github.com/emilk/egui/pull/4969) by [@emilk](https://github.com/emilk)
51+
* Add `egui::Sides` for adding UI on left and right sides [#5036](https://github.com/emilk/egui/pull/5036) by [@emilk](https://github.com/emilk)
52+
* Make light & dark visuals customizable when following the system theme [#4744](https://github.com/emilk/egui/pull/4744) [#4860](https://github.com/emilk/egui/pull/4860) by [@bash](https://github.com/bash)
53+
* Interactive `Ui`:s: add `UiBuilder::sense` and `Ui::response` [#5054](https://github.com/emilk/egui/pull/5054) by [@lucasmerlin](https://github.com/lucasmerlin)
54+
* Add a menu button with text and image [#4748](https://github.com/emilk/egui/pull/4748) by [@NicolasBircksZR](https://github.com/NicolasBircksZR)
55+
* Add `Ui::columns_const()` [#4764](https://github.com/emilk/egui/pull/4764) by [@v0x0g](https://github.com/v0x0g)
56+
* Add `Slider::max_decimals_opt` [#4953](https://github.com/emilk/egui/pull/4953) by [@bircni](https://github.com/bircni)
57+
* Add `Label::halign` [#4975](https://github.com/emilk/egui/pull/4975) by [@rustbasic](https://github.com/rustbasic)
58+
* Add `ui.shrink_clip_rect` [#5068](https://github.com/emilk/egui/pull/5068) by [@emilk](https://github.com/emilk)
59+
* Add `ScrollArea::scroll_bar_rect` [#5070](https://github.com/emilk/egui/pull/5070) by [@emilk](https://github.com/emilk)
60+
* Add `Options::input_options` for click-delay etc [#4942](https://github.com/emilk/egui/pull/4942) by [@girtsf](https://github.com/girtsf)
61+
* Add `WidgetType::RadioGroup` [#5081](https://github.com/emilk/egui/pull/5081) by [@bash](https://github.com/bash)
62+
* Add return value to `with_accessibility_parent` [#5083](https://github.com/emilk/egui/pull/5083) by [@bash](https://github.com/bash)
63+
* Add `Ui::with_visual_transform` [#5055](https://github.com/emilk/egui/pull/5055) by [@lucasmerlin](https://github.com/lucasmerlin)
64+
* Make `Slider` and `DragValue` compatible with `NonZeroUsize` etc [#5105](https://github.com/emilk/egui/pull/5105) by [@emilk](https://github.com/emilk)
65+
* Add `Context::request_discard` for multi-pass layouts [#5059](https://github.com/emilk/egui/pull/5059) by [@emilk](https://github.com/emilk)
66+
* Add UI to modify `FontTweak` live [#5125](https://github.com/emilk/egui/pull/5125) by [@emilk](https://github.com/emilk)
67+
* Add `Response::intrinsic_size` to enable better layout in 3rd party crates [#5082](https://github.com/emilk/egui/pull/5082) by [@lucasmerlin](https://github.com/lucasmerlin)
68+
* Add support for mipmap textures [#5146](https://github.com/emilk/egui/pull/5146) by [@nolanderc](https://github.com/nolanderc)
69+
* Add `DebugOptions::show_unaligned` [#5165](https://github.com/emilk/egui/pull/5165) by [@emilk](https://github.com/emilk)
70+
* Add `Slider::clamping` for precise clamp control [#5119](https://github.com/emilk/egui/pull/5119) by [@emilk](https://github.com/emilk)
71+
72+
### 🚀 Performance
73+
* Optimize `Color32::from_rgba_unmultiplied` with LUT [#5088](https://github.com/emilk/egui/pull/5088) by [@YgorSouza](https://github.com/YgorSouza)
74+
75+
### 🔧 Changed
76+
* Rename `id_source` to `id_salt` [#5025](https://github.com/emilk/egui/pull/5025) by [@bircni](https://github.com/bircni)
77+
* Avoid some `Id` clashes by seeding auto-ids with child id [#4840](https://github.com/emilk/egui/pull/4840) by [@ironpeak](https://github.com/ironpeak)
78+
* Nicer looking text selection, especially in light mode [#5017](https://github.com/emilk/egui/pull/5017) by [@emilk](https://github.com/emilk)
79+
* Fix blurry lines by aligning to pixel grid [#4943](https://github.com/emilk/egui/pull/4943) by [@juancampa](https://github.com/juancampa)
80+
* Center-align all text vertically [#5117](https://github.com/emilk/egui/pull/5117) by [@emilk](https://github.com/emilk)
81+
* Clamp margin values in `Margin::ui` [#4873](https://github.com/emilk/egui/pull/4873) by [@rustbasic](https://github.com/rustbasic)
82+
* Make `scroll_to_*` animations configurable [#4305](https://github.com/emilk/egui/pull/4305) by [@lucasmerlin](https://github.com/lucasmerlin)
83+
* Update `Button` to correctly align contained image [#4891](https://github.com/emilk/egui/pull/4891) by [@PrimmR](https://github.com/PrimmR)
84+
* Deprecate `ahash` re-exports [#4979](https://github.com/emilk/egui/pull/4979) by [@oscargus](https://github.com/oscargus)
85+
* Fix: Ensures correct IME behavior when the text input area gains or loses focus [#4896](https://github.com/emilk/egui/pull/4896) by [@rustbasic](https://github.com/rustbasic)
86+
* Enable rustdoc `generate-link-to-definition` feature on docs.rs [#5030](https://github.com/emilk/egui/pull/5030) by [@GuillaumeGomez](https://github.com/GuillaumeGomez)
87+
* Make some `Memory` methods public [#5046](https://github.com/emilk/egui/pull/5046) by [@bircni](https://github.com/bircni)
88+
* Deprecate `ui.set_sizing_pass` [#5074](https://github.com/emilk/egui/pull/5074) by [@emilk](https://github.com/emilk)
89+
* Export module `egui::frame` [#5087](https://github.com/emilk/egui/pull/5087) by [@simgt](https://github.com/simgt)
90+
* Use `log` crate instead of `eprintln` & remove some unwraps [#5010](https://github.com/emilk/egui/pull/5010) by [@bircni](https://github.com/bircni)
91+
* Fix: `Event::Copy` and `Event::Cut` behave as if they select the entire text when there is no selection [#5115](https://github.com/emilk/egui/pull/5115) by [@rustbasic](https://github.com/rustbasic)
92+
93+
### 🐛 Fixed
94+
* Prevent text shrinking in tooltips; round wrap-width to integer [#5161](https://github.com/emilk/egui/pull/5161) by [@emilk](https://github.com/emilk)
95+
* Fix bug causing tooltips with dynamic content to shrink [#5168](https://github.com/emilk/egui/pull/5168) by [@emilk](https://github.com/emilk)
96+
* Remove some debug asserts [#4826](https://github.com/emilk/egui/pull/4826) by [@emilk](https://github.com/emilk)
97+
* Handle the IME event first in `TextEdit` to fix some bugs [#4794](https://github.com/emilk/egui/pull/4794) by [@rustbasic](https://github.com/rustbasic)
98+
* Slider: round to decimals after applying `step_by` [#4822](https://github.com/emilk/egui/pull/4822) by [@AurevoirXavier](https://github.com/AurevoirXavier)
99+
* Fix: hint text follows the alignment set on the `TextEdit` [#4889](https://github.com/emilk/egui/pull/4889) by [@PrimmR](https://github.com/PrimmR)
100+
* Request focus on a `TextEdit` when clicked [#4991](https://github.com/emilk/egui/pull/4991) by [@Zoxc](https://github.com/Zoxc)
101+
* Fix `Id` clash in `Frame` styling widget [#4967](https://github.com/emilk/egui/pull/4967) by [@YgorSouza](https://github.com/YgorSouza)
102+
* Prevent `ScrollArea` contents from exceeding the container size [#5006](https://github.com/emilk/egui/pull/5006) by [@DouglasDwyer](https://github.com/DouglasDwyer)
103+
* Fix bug in size calculation of truncated text [#5076](https://github.com/emilk/egui/pull/5076) by [@emilk](https://github.com/emilk)
104+
* Fix: Make sure `RawInput::take` clears all events, like it says it does [#5104](https://github.com/emilk/egui/pull/5104) by [@emilk](https://github.com/emilk)
105+
* Fix `DragValue` range clamping [#5118](https://github.com/emilk/egui/pull/5118) by [@emilk](https://github.com/emilk)
106+
* Fix: panic when dragging window between monitors of different pixels_per_point [#4868](https://github.com/emilk/egui/pull/4868) by [@rustbasic](https://github.com/rustbasic)
107+
108+
10109
## 0.28.1 - 2024-07-05 - Tooltip tweaks
11110
### ⭐ Added
12111
* Add `Image::uri()` [#4720](https://github.com/emilk/egui/pull/4720) by [@rustbasic](https://github.com/rustbasic)

Cargo.lock

+14-14
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
11661166

11671167
[[package]]
11681168
name = "ecolor"
1169-
version = "0.28.1"
1169+
version = "0.29.0"
11701170
dependencies = [
11711171
"bytemuck",
11721172
"cint",
@@ -1178,7 +1178,7 @@ dependencies = [
11781178

11791179
[[package]]
11801180
name = "eframe"
1181-
version = "0.28.1"
1181+
version = "0.29.0"
11821182
dependencies = [
11831183
"ahash",
11841184
"bytemuck",
@@ -1218,7 +1218,7 @@ dependencies = [
12181218

12191219
[[package]]
12201220
name = "egui"
1221-
version = "0.28.1"
1221+
version = "0.29.0"
12221222
dependencies = [
12231223
"accesskit",
12241224
"ahash",
@@ -1235,7 +1235,7 @@ dependencies = [
12351235

12361236
[[package]]
12371237
name = "egui-wgpu"
1238-
version = "0.28.1"
1238+
version = "0.29.0"
12391239
dependencies = [
12401240
"ahash",
12411241
"bytemuck",
@@ -1253,7 +1253,7 @@ dependencies = [
12531253

12541254
[[package]]
12551255
name = "egui-winit"
1256-
version = "0.28.1"
1256+
version = "0.29.0"
12571257
dependencies = [
12581258
"accesskit_winit",
12591259
"ahash",
@@ -1273,7 +1273,7 @@ dependencies = [
12731273

12741274
[[package]]
12751275
name = "egui_demo_app"
1276-
version = "0.28.1"
1276+
version = "0.29.0"
12771277
dependencies = [
12781278
"bytemuck",
12791279
"chrono",
@@ -1298,7 +1298,7 @@ dependencies = [
12981298

12991299
[[package]]
13001300
name = "egui_demo_lib"
1301-
version = "0.28.1"
1301+
version = "0.29.0"
13021302
dependencies = [
13031303
"chrono",
13041304
"criterion",
@@ -1311,7 +1311,7 @@ dependencies = [
13111311

13121312
[[package]]
13131313
name = "egui_extras"
1314-
version = "0.28.1"
1314+
version = "0.29.0"
13151315
dependencies = [
13161316
"ahash",
13171317
"chrono",
@@ -1330,7 +1330,7 @@ dependencies = [
13301330

13311331
[[package]]
13321332
name = "egui_glow"
1333-
version = "0.28.1"
1333+
version = "0.29.0"
13341334
dependencies = [
13351335
"ahash",
13361336
"bytemuck",
@@ -1370,7 +1370,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
13701370

13711371
[[package]]
13721372
name = "emath"
1373-
version = "0.28.1"
1373+
version = "0.29.0"
13741374
dependencies = [
13751375
"bytemuck",
13761376
"document-features",
@@ -1445,7 +1445,7 @@ dependencies = [
14451445

14461446
[[package]]
14471447
name = "epaint"
1448-
version = "0.28.1"
1448+
version = "0.29.0"
14491449
dependencies = [
14501450
"ab_glyph",
14511451
"ahash",
@@ -1466,7 +1466,7 @@ dependencies = [
14661466

14671467
[[package]]
14681468
name = "epaint_default_fonts"
1469-
version = "0.28.1"
1469+
version = "0.29.0"
14701470

14711471
[[package]]
14721472
name = "equivalent"
@@ -3069,7 +3069,7 @@ checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2"
30693069

30703070
[[package]]
30713071
name = "popups"
3072-
version = "0.28.1"
3072+
version = "0.29.0"
30733073
dependencies = [
30743074
"eframe",
30753075
"env_logger",
@@ -5026,7 +5026,7 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
50265026

50275027
[[package]]
50285028
name = "xtask"
5029-
version = "0.28.1"
5029+
version = "0.29.0"
50305030

50315031
[[package]]
50325032
name = "yaml-rust"

Cargo.toml

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ members = [
2323
edition = "2021"
2424
license = "MIT OR Apache-2.0"
2525
rust-version = "1.76"
26-
version = "0.28.1"
26+
version = "0.29.0"
2727

2828

2929
[profile.release]
@@ -54,17 +54,17 @@ opt-level = 2
5454

5555

5656
[workspace.dependencies]
57-
emath = { version = "0.28.1", path = "crates/emath", default-features = false }
58-
ecolor = { version = "0.28.1", path = "crates/ecolor", default-features = false }
59-
epaint = { version = "0.28.1", path = "crates/epaint", default-features = false }
60-
epaint_default_fonts = { version = "0.28.1", path = "crates/epaint_default_fonts" }
61-
egui = { version = "0.28.1", path = "crates/egui", default-features = false }
62-
egui-winit = { version = "0.28.1", path = "crates/egui-winit", default-features = false }
63-
egui_extras = { version = "0.28.1", path = "crates/egui_extras", default-features = false }
64-
egui-wgpu = { version = "0.28.1", path = "crates/egui-wgpu", default-features = false }
65-
egui_demo_lib = { version = "0.28.1", path = "crates/egui_demo_lib", default-features = false }
66-
egui_glow = { version = "0.28.1", path = "crates/egui_glow", default-features = false }
67-
eframe = { version = "0.28.1", path = "crates/eframe", default-features = false }
57+
emath = { version = "0.29.0", path = "crates/emath", default-features = false }
58+
ecolor = { version = "0.29.0", path = "crates/ecolor", default-features = false }
59+
epaint = { version = "0.29.0", path = "crates/epaint", default-features = false }
60+
epaint_default_fonts = { version = "0.29.0", path = "crates/epaint_default_fonts" }
61+
egui = { version = "0.29.0", path = "crates/egui", default-features = false }
62+
egui-winit = { version = "0.29.0", path = "crates/egui-winit", default-features = false }
63+
egui_extras = { version = "0.29.0", path = "crates/egui_extras", default-features = false }
64+
egui-wgpu = { version = "0.29.0", path = "crates/egui-wgpu", default-features = false }
65+
egui_demo_lib = { version = "0.29.0", path = "crates/egui_demo_lib", default-features = false }
66+
egui_glow = { version = "0.29.0", path = "crates/egui_glow", default-features = false }
67+
eframe = { version = "0.29.0", path = "crates/eframe", default-features = false }
6868

6969
ahash = { version = "0.8.11", default-features = false, features = [
7070
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead

RELEASES.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ We don't update the MSRV in a patch release, unless we really, really need to.
5454
* [ ] write a short release note that fits in a tweet
5555
* [ ] record gif for `CHANGELOG.md` release note (and later twitter post)
5656
* [ ] update changelogs using `scripts/generate_changelog.py --write`
57-
- For major releases, always diff to the latest MAJOR release, e.g. `--commit-range 0.27.0..HEAD`
57+
- For major releases, always diff to the latest MAJOR release, e.g. `--commit-range 0.29.0..HEAD`
5858
* [ ] bump version numbers in workspace `Cargo.toml`
5959

6060
## Actual release
6161
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.
6262

63+
* [ ] Run `typos`
6364
* [ ] `git commit -m 'Release 0.x.0 - summary'`
6465
* [ ] `cargo publish` (see below)
6566
* [ ] `git tag -a 0.x.0 -m 'Release 0.x.0 - summary'`
@@ -74,8 +75,8 @@ I usually do this all on the `master` branch, but doing it in a release branch i
7475
```
7576
(cd crates/emath && cargo publish --quiet) && echo "✅ emath"
7677
(cd crates/ecolor && cargo publish --quiet) && echo "✅ ecolor"
77-
(cd crates/epaint && cargo publish --quiet) && echo "✅ epaint"
7878
(cd crates/epaint_default_fonts && cargo publish --quiet) && echo "✅ epaint_default_fonts"
79+
(cd crates/epaint && cargo publish --quiet) && echo "✅ epaint"
7980
(cd crates/egui && cargo publish --quiet) && echo "✅ egui"
8081
(cd crates/egui-winit && cargo publish --quiet) && echo "✅ egui-winit"
8182
(cd crates/egui_extras && cargo publish --quiet) && echo "✅ egui_extras"
@@ -95,4 +96,5 @@ I usually do this all on the `master` branch, but doing it in a release branch i
9596
## After release
9697
* [ ] publish new `eframe_template`
9798
* [ ] publish new `egui_plot`
99+
* [ ] publish new `egui_table`
98100
* [ ] publish new `egui_tiles`

crates/ecolor/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This file is updated upon each release.
66
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.
77

88

9+
## 0.29.0 - 2024-09-26
10+
* Document the fact that the `hex_color!` macro is not `const` [#5169](https://github.com/emilk/egui/pull/5169) by [@YgorSouza](https://github.com/YgorSouza)
11+
12+
913
## 0.28.1 - 2024-07-05
1014
Nothing new
1115

0 commit comments

Comments
 (0)