Skip to content

Commit 9385e31

Browse files
committed
merge: from office repo
2 parents 6e7b3c7 + 7f71166 commit 9385e31

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+862
-694
lines changed

.gitattributes

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
* text=auto eol=lf
22
Cargo.lock linguist-generated=false
33
*.png filter=lfs diff=lfs merge=lfs -text
4-
# The icon.png is needed when including eframe via git, so it may not be in lfs
4+
5+
# Exclude some small files from LFS:
56
crates/eframe/data/* !filter !diff !merge text=auto eol=lf
7+
crates/egui_demo_lib/data/* !filter !diff !merge text=auto eol=lf
8+
crates/egui/assets/* !filter !diff !merge text=auto eol=lf

.github/workflows/png_only_on_lfs.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,18 @@ jobs:
1313
- name: Check that png files are on git LFS
1414
run: |
1515
binary_extensions="png"
16-
exclude="crates/eframe/data"
16+
exclude_paths=(
17+
"crates/eframe/data"
18+
"crates/egui_demo_lib/data/"
19+
"crates/egui/assets/"
20+
)
1721
1822
# Find binary files that are not tracked by Git LFS
1923
for ext in $binary_extensions; do
20-
if comm -23 <(git ls-files | grep -v "^$exclude" | sort) <(git lfs ls-files -n | sort) | grep "\.${ext}$"; then
24+
# Create grep pattern to exclude multiple paths
25+
exclude_pattern=$(printf "|^%s" "${exclude_paths[@]}" | sed 's/^|//')
26+
27+
if comm -23 <(git ls-files | grep -Ev "$exclude_pattern" | sort) <(git lfs ls-files -n | sort) | grep "\.${ext}$"; then
2128
echo "Error: Found binary file with extension .$ext not tracked by git LFS. See CONTRIBUTING.md"
2229
exit 1
2330
fi

CHANGELOG.md

+88
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,94 @@ This file is updated upon each release.
1414
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.
1515

1616

17+
## 0.30.0 - 2024-12-16 - Modals and better layer support
18+
19+
### ✨ Highlights
20+
* Add `Modal`, a popup that blocks input to the rest of the application ([#5358](https://github.com/emilk/egui/pull/5358) by [@lucasmerlin](https://github.com/lucasmerlin))
21+
* Improved support for transform layers ([#5465](https://github.com/emilk/egui/pull/5465), [#5468](https://github.com/emilk/egui/pull/5468), [#5429](https://github.com/emilk/egui/pull/5429))
22+
23+
#### `egui_kittest`
24+
This release welcomes a new crate to the family: [egui_kittest](https://github.com/emilk/egui/tree/master/crates/egui_kittest).
25+
`egui_kittest` is a testing framework for egui, allowing you to test both automation (simulated clicks and other events),
26+
and also do screenshot testing (useful for regression tests).
27+
`egui_kittest` is built using [`kittest`](https://github.com/rerun-io/kittest), which is a general GUI testing framework that aims to work with any Rust GUI (not just egui!).
28+
`kittest` uses the accessibility library [`AccessKit`](https://github.com/AccessKit/accesskit/) for automatation and to query the widget tree.
29+
30+
`kittest` and `egui_kittest` are written by [@lucasmerlin](https://github.com/lucasmerlin).
31+
32+
Here's a quick example of how to use `egui_kittest` to test a checkbox:
33+
34+
```rust
35+
use egui::accesskit::Toggled;
36+
use egui_kittest::{Harness, kittest::Queryable};
37+
38+
fn main() {
39+
let mut checked = false;
40+
let app = |ui: &mut egui::Ui| {
41+
ui.checkbox(&mut checked, "Check me!");
42+
};
43+
44+
let mut harness = egui_kittest::Harness::new_ui(app);
45+
46+
let checkbox = harness.get_by_label("Check me!");
47+
assert_eq!(checkbox.toggled(), Some(Toggled::False));
48+
checkbox.click();
49+
50+
harness.run();
51+
52+
let checkbox = harness.get_by_label("Check me!");
53+
assert_eq!(checkbox.toggled(), Some(Toggled::True));
54+
55+
// You can even render the ui and do image snapshot tests
56+
#[cfg(all(feature = "wgpu", feature = "snapshot"))]
57+
harness.wgpu_snapshot("readme_example");
58+
}
59+
```
60+
61+
### ⭐ Added
62+
* Add `Modal` and `Memory::set_modal_layer` [#5358](https://github.com/emilk/egui/pull/5358) by [@lucasmerlin](https://github.com/lucasmerlin)
63+
* Add `UiBuilder::layer_id` and remove `layer_id` from `Ui::new` [#5195](https://github.com/emilk/egui/pull/5195) by [@emilk](https://github.com/emilk)
64+
* Allow easier setting of background color for `TextEdit` [#5203](https://github.com/emilk/egui/pull/5203) by [@bircni](https://github.com/bircni)
65+
* Set `Response::intrinsic_size` for `TextEdit` [#5266](https://github.com/emilk/egui/pull/5266) by [@lucasmerlin](https://github.com/lucasmerlin)
66+
* Expose center position in `MultiTouchInfo` [#5247](https://github.com/emilk/egui/pull/5247) by [@lucasmerlin](https://github.com/lucasmerlin)
67+
* `Context::add_font` [#5228](https://github.com/emilk/egui/pull/5228) by [@frederik-uni](https://github.com/frederik-uni)
68+
* Impl from `Box<str>` for `WidgetText`, `RichText` [#5309](https://github.com/emilk/egui/pull/5309) by [@dimtpap](https://github.com/dimtpap)
69+
* Add `Window::scroll_bar_visibility` [#5231](https://github.com/emilk/egui/pull/5231) by [@Zeenobit](https://github.com/Zeenobit)
70+
* Add `ComboBox::close_behavior` [#5305](https://github.com/emilk/egui/pull/5305) by [@avalsch](https://github.com/avalsch)
71+
* Add `painter.line()` [#5291](https://github.com/emilk/egui/pull/5291) by [@bircni](https://github.com/bircni)
72+
* Allow attaching custom user data to a screenshot command [#5416](https://github.com/emilk/egui/pull/5416) by [@emilk](https://github.com/emilk)
73+
* Add `Button::image_tint_follows_text_color` [#5430](https://github.com/emilk/egui/pull/5430) by [@emilk](https://github.com/emilk)
74+
* Consume escape keystroke when bailing out from a drag operation [#5433](https://github.com/emilk/egui/pull/5433) by [@abey79](https://github.com/abey79)
75+
* Add `Context::layer_transform_to_global` & `layer_transform_from_global` [#5465](https://github.com/emilk/egui/pull/5465) by [@emilk](https://github.com/emilk)
76+
77+
### 🔧 Changed
78+
* Update MSRV to Rust 1.80 [#5421](https://github.com/emilk/egui/pull/5421), [#5457](https://github.com/emilk/egui/pull/5457) by [@emilk](https://github.com/emilk)
79+
* Expand max font atlas size from 8k to 16k [#5257](https://github.com/emilk/egui/pull/5257) by [@rustbasic](https://github.com/rustbasic)
80+
* Put font data into `Arc` to reduce memory consumption [#5276](https://github.com/emilk/egui/pull/5276) by [@StarStarJ](https://github.com/StarStarJ)
81+
* Move `egui::util::cache` to `egui::cache`; add `FramePublisher` [#5426](https://github.com/emilk/egui/pull/5426) by [@emilk](https://github.com/emilk)
82+
* Remove `Order::PanelResizeLine` [#5455](https://github.com/emilk/egui/pull/5455) by [@emilk](https://github.com/emilk)
83+
* Drag-and-drop: keep cursor set by user, if any [#5467](https://github.com/emilk/egui/pull/5467) by [@abey79](https://github.com/abey79)
84+
* Use `profiling` crate to support more profiler backends [#5150](https://github.com/emilk/egui/pull/5150) by [@teddemunnik](https://github.com/teddemunnik)
85+
* Improve hit-test of thin widgets, and widgets across layers [#5468](https://github.com/emilk/egui/pull/5468) by [@emilk](https://github.com/emilk)
86+
87+
### 🐛 Fixed
88+
* Update `ScrollArea` drag velocity when drag stopped [#5175](https://github.com/emilk/egui/pull/5175) by [@valadaptive](https://github.com/valadaptive)
89+
* Fix bug causing wrong-fire of `ViewportCommand::Visible` [#5244](https://github.com/emilk/egui/pull/5244) by [@rustbasic](https://github.com/rustbasic)
90+
* Fix: `Ui::new_child` does not consider the `sizing_pass` field of `UiBuilder` [#5262](https://github.com/emilk/egui/pull/5262) by [@zhatuokun](https://github.com/zhatuokun)
91+
* Fix Ctrl+Shift+Z redo shortcut [#5258](https://github.com/emilk/egui/pull/5258) by [@YgorSouza](https://github.com/YgorSouza)
92+
* Fix: `Window::default_pos` does not work [#5315](https://github.com/emilk/egui/pull/5315) by [@rustbasic](https://github.com/rustbasic)
93+
* Fix: `Sides` did not apply the layout position correctly [#5303](https://github.com/emilk/egui/pull/5303) by [@zhatuokun](https://github.com/zhatuokun)
94+
* Respect `Style::override_font_id` in `RichText` [#5310](https://github.com/emilk/egui/pull/5310) by [@MStarha](https://github.com/MStarha)
95+
* Fix disabled widgets "eating" focus [#5370](https://github.com/emilk/egui/pull/5370) by [@lucasmerlin](https://github.com/lucasmerlin)
96+
* Fix cursor clipping in `TextEdit` inside a `ScrollArea` [#3660](https://github.com/emilk/egui/pull/3660) by [@juancampa](https://github.com/juancampa)
97+
* Make text cursor always appear on click [#5420](https://github.com/emilk/egui/pull/5420) by [@juancampa](https://github.com/juancampa)
98+
* Fix `on_hover_text_at_pointer` for transformed layers [#5429](https://github.com/emilk/egui/pull/5429) by [@emilk](https://github.com/emilk)
99+
* Fix: don't interact with `Area` outside its `constrain_rect` [#5459](https://github.com/emilk/egui/pull/5459) by [@MScottMcBee](https://github.com/MScottMcBee)
100+
* Fix broken images on egui.rs (move from git lfs to normal git) [#5480](https://github.com/emilk/egui/pull/5480) by [@emilk](https://github.com/emilk)
101+
* Fix: `ui.new_child` should now respect `disabled` [#5483](https://github.com/emilk/egui/pull/5483) by [@emilk](https://github.com/emilk)
102+
* Fix zero-width strokes still affecting the feathering color of boxes [#5485](https://github.com/emilk/egui/pull/5485) by [@emilk](https://github.com/emilk)
103+
104+
17105
## 0.29.1 - 2024-10-01 - Bug fixes
18106
* Remove debug-assert triggered by `with_layer_id/dnd_drag_source` [#5191](https://github.com/emilk/egui/pull/5191) by [@emilk](https://github.com/emilk)
19107
* Fix id clash in `Ui::response` [#5192](https://github.com/emilk/egui/pull/5192) by [@emilk](https://github.com/emilk)

Cargo.lock

+40-26
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
12001200

12011201
[[package]]
12021202
name = "ecolor"
1203-
version = "0.29.1"
1203+
version = "0.30.0"
12041204
dependencies = [
12051205
"bytemuck",
12061206
"cint",
@@ -1212,7 +1212,7 @@ dependencies = [
12121212

12131213
[[package]]
12141214
name = "eframe"
1215-
version = "0.29.1"
1215+
version = "0.30.0"
12161216
dependencies = [
12171217
"ahash",
12181218
"bytemuck",
@@ -1235,7 +1235,7 @@ dependencies = [
12351235
"parking_lot",
12361236
"percent-encoding",
12371237
"pollster 0.4.0",
1238-
"puffin",
1238+
"profiling",
12391239
"raw-window-handle 0.6.2",
12401240
"ron",
12411241
"serde",
@@ -1252,33 +1252,32 @@ dependencies = [
12521252

12531253
[[package]]
12541254
name = "egui"
1255-
version = "0.29.1"
1255+
version = "0.30.0"
12561256
dependencies = [
12571257
"accesskit",
12581258
"ahash",
12591259
"backtrace",
12601260
"document-features",
1261-
"egui_kittest",
12621261
"emath",
12631262
"epaint",
12641263
"log",
12651264
"nohash-hasher",
1266-
"puffin",
1265+
"profiling",
12671266
"ron",
12681267
"serde",
12691268
]
12701269

12711270
[[package]]
12721271
name = "egui-wgpu"
1273-
version = "0.29.1"
1272+
version = "0.30.0"
12741273
dependencies = [
12751274
"ahash",
12761275
"bytemuck",
12771276
"document-features",
12781277
"egui",
12791278
"epaint",
12801279
"log",
1281-
"puffin",
1280+
"profiling",
12821281
"thiserror",
12831282
"type-map",
12841283
"web-time",
@@ -1288,15 +1287,15 @@ dependencies = [
12881287

12891288
[[package]]
12901289
name = "egui-winit"
1291-
version = "0.29.1"
1290+
version = "0.30.0"
12921291
dependencies = [
12931292
"accesskit_winit",
12941293
"ahash",
12951294
"arboard",
12961295
"document-features",
12971296
"egui",
12981297
"log",
1299-
"puffin",
1298+
"profiling",
13001299
"raw-window-handle 0.6.2",
13011300
"serde",
13021301
"smithay-clipboard",
@@ -1308,7 +1307,7 @@ dependencies = [
13081307

13091308
[[package]]
13101309
name = "egui_demo_app"
1311-
version = "0.29.1"
1310+
version = "0.30.0"
13121311
dependencies = [
13131312
"bytemuck",
13141313
"chrono",
@@ -1321,6 +1320,7 @@ dependencies = [
13211320
"image",
13221321
"log",
13231322
"poll-promise",
1323+
"profiling",
13241324
"puffin",
13251325
"puffin_http",
13261326
"rfd",
@@ -1333,13 +1333,12 @@ dependencies = [
13331333

13341334
[[package]]
13351335
name = "egui_demo_lib"
1336-
version = "0.29.1"
1336+
version = "0.30.0"
13371337
dependencies = [
13381338
"chrono",
13391339
"criterion",
13401340
"document-features",
13411341
"egui",
1342-
"egui_demo_lib",
13431342
"egui_extras",
13441343
"egui_kittest",
13451344
"once_cell",
@@ -1351,7 +1350,7 @@ dependencies = [
13511350

13521351
[[package]]
13531352
name = "egui_extras"
1354-
version = "0.29.1"
1353+
version = "0.30.0"
13551354
dependencies = [
13561355
"ahash",
13571356
"chrono",
@@ -1362,15 +1361,15 @@ dependencies = [
13621361
"image",
13631362
"log",
13641363
"mime_guess2",
1365-
"puffin",
1364+
"profiling",
13661365
"resvg",
13671366
"serde",
13681367
"syntect",
13691368
]
13701369

13711370
[[package]]
13721371
name = "egui_glow"
1373-
version = "0.29.1"
1372+
version = "0.30.0"
13741373
dependencies = [
13751374
"ahash",
13761375
"bytemuck",
@@ -1382,21 +1381,20 @@ dependencies = [
13821381
"glutin-winit",
13831382
"log",
13841383
"memoffset",
1385-
"puffin",
1384+
"profiling",
13861385
"wasm-bindgen",
13871386
"web-sys",
13881387
"winit",
13891388
]
13901389

13911390
[[package]]
13921391
name = "egui_kittest"
1393-
version = "0.29.1"
1392+
version = "0.30.0"
13941393
dependencies = [
13951394
"dify",
13961395
"document-features",
13971396
"egui",
13981397
"egui-wgpu",
1399-
"egui_kittest",
14001398
"image",
14011399
"kittest",
14021400
"pollster 0.4.0",
@@ -1425,7 +1423,7 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
14251423

14261424
[[package]]
14271425
name = "emath"
1428-
version = "0.29.1"
1426+
version = "0.30.0"
14291427
dependencies = [
14301428
"bytemuck",
14311429
"document-features",
@@ -1516,7 +1514,7 @@ dependencies = [
15161514

15171515
[[package]]
15181516
name = "epaint"
1519-
version = "0.29.1"
1517+
version = "0.30.0"
15201518
dependencies = [
15211519
"ab_glyph",
15221520
"ahash",
@@ -1530,14 +1528,14 @@ dependencies = [
15301528
"log",
15311529
"nohash-hasher",
15321530
"parking_lot",
1533-
"puffin",
1531+
"profiling",
15341532
"rayon",
15351533
"serde",
15361534
]
15371535

15381536
[[package]]
15391537
name = "epaint_default_fonts"
1540-
version = "0.29.1"
1538+
version = "0.30.0"
15411539

15421540
[[package]]
15431541
name = "equivalent"
@@ -2341,7 +2339,8 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
23412339
[[package]]
23422340
name = "kittest"
23432341
version = "0.1.0"
2344-
source = "git+https://github.com/rerun-io/kittest?branch=main#06e01f17fed36a997e1541f37b2d47e3771d7533"
2342+
source = "registry+https://github.com/rust-lang/crates.io-index"
2343+
checksum = "f659954571a3c132356bd15c25f0dcf14d270a28ec5c58797adc2f432831bed5"
23452344
dependencies = [
23462345
"accesskit",
23472346
"accesskit_consumer",
@@ -3067,7 +3066,7 @@ checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"
30673066

30683067
[[package]]
30693068
name = "popups"
3070-
version = "0.29.1"
3069+
version = "0.30.0"
30713070
dependencies = [
30723071
"eframe",
30733072
"env_logger",
@@ -3111,6 +3110,20 @@ name = "profiling"
31113110
version = "1.0.16"
31123111
source = "registry+https://github.com/rust-lang/crates.io-index"
31133112
checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d"
3113+
dependencies = [
3114+
"profiling-procmacros",
3115+
"puffin",
3116+
]
3117+
3118+
[[package]]
3119+
name = "profiling-procmacros"
3120+
version = "1.0.16"
3121+
source = "registry+https://github.com/rust-lang/crates.io-index"
3122+
checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30"
3123+
dependencies = [
3124+
"quote",
3125+
"syn",
3126+
]
31143127

31153128
[[package]]
31163129
name = "puffin"
@@ -3149,6 +3162,7 @@ dependencies = [
31493162
"eframe",
31503163
"env_logger",
31513164
"log",
3165+
"profiling",
31523166
"puffin",
31533167
"puffin_http",
31543168
]
@@ -4974,7 +4988,7 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
49744988

49754989
[[package]]
49764990
name = "xtask"
4977-
version = "0.29.1"
4991+
version = "0.30.0"
49784992

49794993
[[package]]
49804994
name = "yaml-rust"

0 commit comments

Comments
 (0)