Release 0.23.0 - New image API

This commit is contained in:
Emil Ernerfeldt 2023-09-27 16:46:56 +02:00
parent 9b2bcdb4a2
commit 5a0186fa2b
25 changed files with 240 additions and 63 deletions

View File

@ -7,6 +7,91 @@ This file is updated upon each release.
Changes since the last release can be found by running the `scripts/generate_changelog.py` script. Changes since the last release can be found by running the `scripts/generate_changelog.py` script.
## 0.23.0 - 2023-09-27 - New image API
This release contains a simple and powerful image API:
```rs
// Load from web:
ui.image("https://www.example.com/some_image.png");
// Included image in the binary using `include_bytes`:
ui.image(egui::include_image!("../assets/ferris.svg"));
// With options:
ui.add(
egui::Image::new("file://path/to/image.jpg")
.max_width(200.0)
.rounding(10.0),
);
```
The API is based on a plugin-system, where you can tell `egui` how to load the images, and from where.
`egui_extras` comes with loaders for you, so all you need to do is add the following to your `Cargo.toml`:
```toml
egui_extras = { version = "0.23", features = ["all_loaders"] }
image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for
```
And this to your code:
```rs
egui_extras::install_image_loaders(egui_ctx);
```
### ⚠️ BREAKING
* Update MSRV to Rust 1.70.0 [#3310](https://github.com/emilk/egui/pull/3310)
* Break out plotting to own crate `egui_plot` [#3282](https://github.com/emilk/egui/pull/3282)
### ⭐ Added
* A new image API [#3297](https://github.com/emilk/egui/pull/3297) [#3315](https://github.com/emilk/egui/pull/3315) [#3328](https://github.com/emilk/egui/pull/3328) [#3338](https://github.com/emilk/egui/pull/3338) [#3342](https://github.com/emilk/egui/pull/3342) [#3343](https://github.com/emilk/egui/pull/3343) [#3402](https://github.com/emilk/egui/pull/3402) (thanks [@jprochazk](https://github.com/jprochazk)!)
* Add option to truncate text at some width [#3244](https://github.com/emilk/egui/pull/3244)
* Add control of line height and letter spacing [#3302](https://github.com/emilk/egui/pull/3302)
* Support images with rounded corners [#3257](https://github.com/emilk/egui/pull/3257)
* Change focused widget with arrow keys [#3272](https://github.com/emilk/egui/pull/3272) (thanks [@TimonPost](https://github.com/TimonPost)!)
* Add opt-in `puffin` feature to egui [#3298](https://github.com/emilk/egui/pull/3298)
* Add debug-option to show a callstack to the widget under the mouse [#3391](https://github.com/emilk/egui/pull/3391)
* Add `Context::open_url` and `Context::copy_text` [#3380](https://github.com/emilk/egui/pull/3380)
* Add `Area::constrain_to` and `Window::constrain_to` [#3396](https://github.com/emilk/egui/pull/3396)
* Add `Memory::area_rect` [#3161](https://github.com/emilk/egui/pull/3161) (thanks [@tosti007](https://github.com/tosti007)!)
* Add `Margin::expand_rect` and `shrink_rect` [#3214](https://github.com/emilk/egui/pull/3214)
* Provide `into_inner()` for `egui::mutex::{Mutex, RwLock}` [#3110](https://github.com/emilk/egui/pull/3110) (thanks [@KmolYuan](https://github.com/KmolYuan)!)
* Support multi-threaded Wasm [#3236](https://github.com/emilk/egui/pull/3236)
* Change touch force to be `Option<f32>` instead of `f32` [#3240](https://github.com/emilk/egui/pull/3240) (thanks [@lucasmerlin](https://github.com/lucasmerlin)!)
* Add option to always open hyperlink in a new browser tab [#3242](https://github.com/emilk/egui/pull/3242) (thanks [@FreddyFunk](https://github.com/FreddyFunk)!)
* Add `Window::drag_to_scroll` [#3118](https://github.com/emilk/egui/pull/3118) (thanks [@KYovchevski](https://github.com/KYovchevski)!)
* Add `CollapsingState::remove` to clear stored state [#3252](https://github.com/emilk/egui/pull/3252) (thanks [@dmackdev](https://github.com/dmackdev)!)
* Add tooltip_delay option [#3245](https://github.com/emilk/egui/pull/3245) (thanks [@YgorSouza](https://github.com/YgorSouza)!)
* Added `Context::is_context_menu_open()` [#3267](https://github.com/emilk/egui/pull/3267) (thanks [@dmlary](https://github.com/dmlary)!)
* Add `mime` field to `DroppedFile` [#3273](https://github.com/emilk/egui/pull/3273) (thanks [@abey79](https://github.com/abey79)!)
* Allow setting the progress bar height [#3183](https://github.com/emilk/egui/pull/3183) (thanks [@s-nie](https://github.com/s-nie)!)
* Add `scroll_area::State::velocity` [#3300](https://github.com/emilk/egui/pull/3300) (thanks [@Barugon](https://github.com/Barugon)!)
* Add `Visuals::interact_cursor` [#3312](https://github.com/emilk/egui/pull/3312) (thanks [@zkldi](https://github.com/zkldi)!)
* Add method to `RichText` making it easier to construct layout jobs [#3319](https://github.com/emilk/egui/pull/3319) (thanks [@OmegaJak](https://github.com/OmegaJak)!)
* Add `Context::style_mut` [#3359](https://github.com/emilk/egui/pull/3359)
* `std::borrow::Cow<'_, str>` now implements `TextBuffer` [#3164](https://github.com/emilk/egui/pull/3164) (thanks [@burtonageo](https://github.com/burtonageo)!)
### 🔧 Changed
* Separate text cursor from selection visuals [#3181](https://github.com/emilk/egui/pull/3181) (thanks [@lampsitter](https://github.com/lampsitter)!)
* `DragValue`: update value on each key press by default [#2880](https://github.com/emilk/egui/pull/2880) (thanks [@Barugon](https://github.com/Barugon)!)
* Replace uses of `RangeInclusive<f32>` with `emath::Rangef` [#3221](https://github.com/emilk/egui/pull/3221)
* Implement `Send + Sync` for `ColorPickerFn` and `Ui` (#3148) [#3233](https://github.com/emilk/egui/pull/3233) (thanks [@idanarye](https://github.com/idanarye)!)
* Use the minus character instead of "dash" [#3271](https://github.com/emilk/egui/pull/3271)
* Changing `menu_image_button` to use `ImageButton` builder [#3288](https://github.com/emilk/egui/pull/3288) (thanks [@v-kat](https://github.com/v-kat)!)
* Prune old egui memory data when reaching some limit [#3299](https://github.com/emilk/egui/pull/3299)
### 🐛 Fixed
* Fix TextEdit's character limit [#3173](https://github.com/emilk/egui/pull/3173) (thanks [@Serverator](https://github.com/Serverator)!)
* Set the correct unicode character for "ctrl" shortcuts [#3186](https://github.com/emilk/egui/pull/3186) (thanks [@abey79](https://github.com/abey79)!)
* Fix crash in `DragValue` when only setting `min_decimals` [#3231](https://github.com/emilk/egui/pull/3231)
* Fix clipping issued with `ScrollArea` [#2860](https://github.com/emilk/egui/pull/2860) (thanks [@Barugon](https://github.com/Barugon)!)
* Fix moving slider with arrow keys [#3354](https://github.com/emilk/egui/pull/3354)
* Fix problems with tabs in text [#3355](https://github.com/emilk/egui/pull/3355)
* Fix interaction with moved color-picker [#3395](https://github.com/emilk/egui/pull/3395)
## 0.22.0 - 2023-05-23 - A plethora of small improvements ## 0.22.0 - 2023-05-23 - A plethora of small improvements
### ⭐ Added ### ⭐ Added
* Scroll bar visibility options [#2729](https://github.com/emilk/egui/pull/2729) (thanks [@IVAN-MK7](https://github.com/IVAN-MK7)!) * Scroll bar visibility options [#2729](https://github.com/emilk/egui/pull/2729) (thanks [@IVAN-MK7](https://github.com/IVAN-MK7)!)

24
Cargo.lock generated
View File

@ -1167,7 +1167,7 @@ checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd"
[[package]] [[package]]
name = "ecolor" name = "ecolor"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"cint", "cint",
@ -1178,7 +1178,7 @@ dependencies = [
[[package]] [[package]]
name = "eframe" name = "eframe"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"cocoa", "cocoa",
@ -1215,7 +1215,7 @@ dependencies = [
[[package]] [[package]]
name = "egui" name = "egui"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"ahash", "ahash",
@ -1231,7 +1231,7 @@ dependencies = [
[[package]] [[package]]
name = "egui-wgpu" name = "egui-wgpu"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"document-features", "document-features",
@ -1246,7 +1246,7 @@ dependencies = [
[[package]] [[package]]
name = "egui-winit" name = "egui-winit"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"accesskit_winit", "accesskit_winit",
"arboard", "arboard",
@ -1264,7 +1264,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_demo_app" name = "egui_demo_app"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"chrono", "chrono",
@ -1286,7 +1286,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_demo_lib" name = "egui_demo_lib"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"criterion", "criterion",
@ -1301,7 +1301,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_extras" name = "egui_extras"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"document-features", "document-features",
@ -1321,7 +1321,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_glow" name = "egui_glow"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"document-features", "document-features",
@ -1340,7 +1340,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_plot" name = "egui_plot"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"document-features", "document-features",
"egui", "egui",
@ -1369,7 +1369,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]] [[package]]
name = "emath" name = "emath"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"document-features", "document-features",
@ -1445,7 +1445,7 @@ dependencies = [
[[package]] [[package]]
name = "epaint" name = "epaint"
version = "0.22.0" version = "0.23.0"
dependencies = [ dependencies = [
"ab_glyph", "ab_glyph",
"ahash", "ahash",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "ecolor" name = "ecolor"
version = "0.22.0" version = "0.23.0"
authors = [ authors = [
"Emil Ernerfeldt <emil.ernerfeldt@gmail.com>", "Emil Ernerfeldt <emil.ernerfeldt@gmail.com>",
"Andreas Reich <reichandreas@gmx.de>", "Andreas Reich <reichandreas@gmx.de>",

View File

@ -6,6 +6,39 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C
This file is updated upon each release. This file is updated upon each release.
Changes since the last release can be found by running the `scripts/generate_changelog.py` script. Changes since the last release can be found by running the `scripts/generate_changelog.py` script.
## 0.23.0 - 2023-09-27
* Update MSRV to Rust 1.70.0 [#3310](https://github.com/emilk/egui/pull/3310)
* Update to puffin 0.16 [#3144](https://github.com/emilk/egui/pull/3144)
* Update to `wgpu` 0.17.0 [#3170](https://github.com/emilk/egui/pull/3170) (thanks [@Aaron1011](https://github.com/Aaron1011)!)
* Improved wgpu callbacks [#3253](https://github.com/emilk/egui/pull/3253) (thanks [@Wumpf](https://github.com/Wumpf)!)
* Improve documentation of `eframe`, especially for wasm32 [#3295](https://github.com/emilk/egui/pull/3295)
* `eframe::Frame::info` returns a reference [#3301](https://github.com/emilk/egui/pull/3301) (thanks [@Barugon](https://github.com/Barugon)!)
* Move `App::persist_window` to `NativeOptions` and `App::max_size_points` to `WebOptions` [#3397](https://github.com/emilk/egui/pull/3397)
#### Desktop/Native:
* Only show on-screen-keyboard and IME when editing text [#3362](https://github.com/emilk/egui/pull/3362) (thanks [@Barugon](https://github.com/Barugon)!)
* Add `eframe::storage_dir` [#3286](https://github.com/emilk/egui/pull/3286)
* Add `NativeOptions::window_builder` for more customization [#3390](https://github.com/emilk/egui/pull/3390) (thanks [@twop](https://github.com/twop)!)
* Better restore Window position on Mac when on secondary monitor [#3239](https://github.com/emilk/egui/pull/3239)
* Fix iOS support in `eframe` [#3241](https://github.com/emilk/egui/pull/3241) (thanks [@lucasmerlin](https://github.com/lucasmerlin)!)
* Speed up `eframe` state storage [#3353](https://github.com/emilk/egui/pull/3353) (thanks [@sebbert](https://github.com/sebbert)!)
* Allow users to opt-out of default `winit` features [#3228](https://github.com/emilk/egui/pull/3228)
* Expose Raw Window and Display Handles [#3073](https://github.com/emilk/egui/pull/3073) (thanks [@bash](https://github.com/bash)!)
* Use window title as fallback when app_id is not set [#3107](https://github.com/emilk/egui/pull/3107) (thanks [@jacekpoz](https://github.com/jacekpoz)!)
* Sleep a bit only when minimized [#3139](https://github.com/emilk/egui/pull/3139) (thanks [@icedrocket](https://github.com/icedrocket)!)
* Prevent text from being cleared when selected due to winit IME [#3376](https://github.com/emilk/egui/pull/3376) (thanks [@YgorSouza](https://github.com/YgorSouza)!)
* Fix android app quit on resume with glow backend [#3080](https://github.com/emilk/egui/pull/3080) (thanks [@tkkcc](https://github.com/tkkcc)!)
* Fix panic with persistence without window [#3167](https://github.com/emilk/egui/pull/3167) (thanks [@sagebind](https://github.com/sagebind)!)
* Only call `run_return` twice on Windows [#3053](https://github.com/emilk/egui/pull/3053) (thanks [@pan93412](https://github.com/pan93412)!)
* Gracefully catch error saving state to disk [#3230](https://github.com/emilk/egui/pull/3230)
* Recognize numpad enter/plus/minus [#3285](https://github.com/emilk/egui/pull/3285)
* Add more puffin profile scopes to `eframe` [#3330](https://github.com/emilk/egui/pull/3330) [#3332](https://github.com/emilk/egui/pull/3332)
#### Web:
* Update to wasm-bindgen 0.2.87 [#3237](https://github.com/emilk/egui/pull/3237)
* Remove `Function()` invocation from eframe text_agent to bypass "unsafe-eval" restrictions in Chrome browser extensions. [#3349](https://github.com/emilk/egui/pull/3349) (thanks [@aspect](https://github.com/aspect)!)
* Fix docs about web [#3026](https://github.com/emilk/egui/pull/3026) (thanks [@kerryeon](https://github.com/kerryeon)!)
## 0.22.0 - 2023-05-23 ## 0.22.0 - 2023-05-23
* Fix: `request_repaint_after` works even when called from background thread [#2939](https://github.com/emilk/egui/pull/2939) * Fix: `request_repaint_after` works even when called from background thread [#2939](https://github.com/emilk/egui/pull/2939)

View File

@ -1,6 +1,6 @@
[package] [package]
name = "eframe" name = "eframe"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "egui framework - write GUI apps that compiles to web and/or natively" description = "egui framework - write GUI apps that compiles to web and/or natively"
edition = "2021" edition = "2021"
@ -92,7 +92,7 @@ x11 = ["egui-winit/x11"]
__screenshot = [] __screenshot = []
[dependencies] [dependencies]
egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ egui = { version = "0.23.0", path = "../egui", default-features = false, features = [
"bytemuck", "bytemuck",
"log", "log",
] } ] }
@ -105,7 +105,7 @@ thiserror.workspace = true
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { version = "0.2", optional = true }
egui_glow = { version = "0.22.0", path = "../egui_glow", optional = true, default-features = false } egui_glow = { version = "0.23.0", path = "../egui_glow", optional = true, default-features = false }
glow = { version = "0.12", optional = true } glow = { version = "0.12", optional = true }
ron = { version = "0.8", optional = true, features = ["integer128"] } ron = { version = "0.8", optional = true, features = ["integer128"] }
serde = { version = "1", optional = true, features = ["derive"] } serde = { version = "1", optional = true, features = ["derive"] }
@ -113,7 +113,7 @@ serde = { version = "1", optional = true, features = ["derive"] }
# ------------------------------------------- # -------------------------------------------
# native: # native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { version = "0.22.0", path = "../egui-winit", default-features = false, features = [ egui-winit = { version = "0.23.0", path = "../egui-winit", default-features = false, features = [
"clipboard", "clipboard",
"links", "links",
] } ] }
@ -125,7 +125,7 @@ winit = { version = "0.28.1", default-features = false }
# optional native: # optional native:
directories-next = { version = "2", optional = true } directories-next = { version = "2", optional = true }
egui-wgpu = { version = "0.22.0", path = "../egui-wgpu", optional = true, features = [ egui-wgpu = { version = "0.23.0", path = "../egui-wgpu", optional = true, features = [
"winit", "winit",
] } # if wgpu is used, use it with winit ] } # if wgpu is used, use it with winit
pollster = { version = "0.3", optional = true } # needed for wgpu pollster = { version = "0.3", optional = true } # needed for wgpu
@ -199,7 +199,7 @@ web-sys = { version = "0.3.58", features = [
] } ] }
# optional web: # optional web:
egui-wgpu = { version = "0.22.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit egui-wgpu = { version = "0.23.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit
raw-window-handle = { version = "0.5.2", optional = true } raw-window-handle = { version = "0.5.2", optional = true }
tts = { version = "0.25", optional = true, default-features = false } tts = { version = "0.25", optional = true, default-features = false }
wgpu = { workspace = true, optional = true } wgpu = { workspace = true, optional = true }

View File

@ -6,6 +6,13 @@ This file is updated upon each release.
Changes since the last release can be found by running the `scripts/generate_changelog.py` script. Changes since the last release can be found by running the `scripts/generate_changelog.py` script.
## 0.23.0 - 2023-09-27
* Update to `wgpu` 0.17.0 [#3170](https://github.com/emilk/egui/pull/3170) (thanks [@Aaron1011](https://github.com/Aaron1011)!)
* Improved wgpu callbacks [#3253](https://github.com/emilk/egui/pull/3253) (thanks [@Wumpf](https://github.com/Wumpf)!)
* Fix depth texture init with multisampling [#3207](https://github.com/emilk/egui/pull/3207) (thanks [@mauliu](https://github.com/mauliu)!)
* Fix panic on wgpu GL backend due to new screenshot capability [#3078](https://github.com/emilk/egui/pull/3078) (thanks [@amfaber](https://github.com/amfaber)!)
## 0.22.0 - 2023-05-23 ## 0.22.0 - 2023-05-23
* Update to wgpu 0.16 [#2884](https://github.com/emilk/egui/pull/2884) (thanks [@niklaskorz](https://github.com/niklaskorz)!) * Update to wgpu 0.16 [#2884](https://github.com/emilk/egui/pull/2884) (thanks [@niklaskorz](https://github.com/niklaskorz)!)
* Device configuration is now dependent on adapter [#2951](https://github.com/emilk/egui/pull/2951) (thanks [@Wumpf](https://github.com/Wumpf)!) * Device configuration is now dependent on adapter [#2951](https://github.com/emilk/egui/pull/2951) (thanks [@Wumpf](https://github.com/Wumpf)!)

View File

@ -1,6 +1,6 @@
[package] [package]
name = "egui-wgpu" name = "egui-wgpu"
version = "0.22.0" version = "0.23.0"
description = "Bindings for using egui natively using the wgpu library" description = "Bindings for using egui natively using the wgpu library"
authors = [ authors = [
"Nils Hasenbanck <nils@hasenbanck.de>", "Nils Hasenbanck <nils@hasenbanck.de>",
@ -36,7 +36,7 @@ winit = ["dep:winit"]
[dependencies] [dependencies]
epaint = { version = "0.22.0", path = "../epaint", default-features = false, features = [ epaint = { version = "0.23.0", path = "../epaint", default-features = false, features = [
"bytemuck", "bytemuck",
] } ] }

View File

@ -5,6 +5,13 @@ This file is updated upon each release.
Changes since the last release can be found by running the `scripts/generate_changelog.py` script. Changes since the last release can be found by running the `scripts/generate_changelog.py` script.
## 0.23.0 - 2023-09-27
* Only show on-screen-keyboard and IME when editing text [#3362](https://github.com/emilk/egui/pull/3362) (thanks [@Barugon](https://github.com/Barugon)!)
* Replace `instant` with `web_time` [#3296](https://github.com/emilk/egui/pull/3296)
* Allow users to opt-out of default `winit` features [#3228](https://github.com/emilk/egui/pull/3228)
* Recognize numpad enter/plus/minus [#3285](https://github.com/emilk/egui/pull/3285)
## 0.22.0 - 2023-05-23 ## 0.22.0 - 2023-05-23
* Only use `wasm-bindgen` feature for `instant` when building for wasm32 [#2808](https://github.com/emilk/egui/pull/2808) (thanks [@gferon](https://github.com/gferon)!) * Only use `wasm-bindgen` feature for `instant` when building for wasm32 [#2808](https://github.com/emilk/egui/pull/2808) (thanks [@gferon](https://github.com/gferon)!)
* Fix unsafe API of `Clipboard::new` [#2765](https://github.com/emilk/egui/pull/2765) (thanks [@dhardy](https://github.com/dhardy)!) * Fix unsafe API of `Clipboard::new` [#2765](https://github.com/emilk/egui/pull/2765) (thanks [@dhardy](https://github.com/dhardy)!)

View File

@ -1,6 +1,6 @@
[package] [package]
name = "egui-winit" name = "egui-winit"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Bindings for using egui with winit" description = "Bindings for using egui with winit"
edition = "2021" edition = "2021"
@ -55,7 +55,7 @@ wayland = ["winit/wayland"]
x11 = ["winit/x11"] x11 = ["winit/x11"]
[dependencies] [dependencies]
egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ egui = { version = "0.23.0", path = "../egui", default-features = false, features = [
"log", "log",
] } ] }
log = { version = "0.4", features = ["std"] } log = { version = "0.4", features = ["std"] }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "egui" name = "egui"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "An easy-to-use immediate mode GUI that runs on both web and native" description = "An easy-to-use immediate mode GUI that runs on both web and native"
edition = "2021" edition = "2021"
@ -76,7 +76,7 @@ unity = ["epaint/unity"]
[dependencies] [dependencies]
epaint = { version = "0.22.0", path = "../epaint", default-features = false } epaint = { version = "0.23.0", path = "../epaint", default-features = false }
ahash = { version = "0.8.1", default-features = false, features = [ ahash = { version = "0.8.1", default-features = false, features = [
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead "no-rng", # we don't need DOS-protection, so we let users opt-in to it instead

View File

@ -1,6 +1,6 @@
[package] [package]
name = "egui_demo_app" name = "egui_demo_app"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
edition = "2021" edition = "2021"
@ -33,13 +33,13 @@ chrono = { version = "0.4", default-features = false, features = [
"js-sys", "js-sys",
"wasmbind", "wasmbind",
] } ] }
eframe = { version = "0.22.0", path = "../eframe", default-features = false } eframe = { version = "0.23.0", path = "../eframe", default-features = false }
egui = { version = "0.22.0", path = "../egui", features = [ egui = { version = "0.23.0", path = "../egui", features = [
"callstack", "callstack",
"extra_debug_asserts", "extra_debug_asserts",
"log", "log",
] } ] }
egui_demo_lib = { version = "0.22.0", path = "../egui_demo_lib", features = [ egui_demo_lib = { version = "0.23.0", path = "../egui_demo_lib", features = [
"chrono", "chrono",
] } ] }
log = { version = "0.4", features = ["std"] } log = { version = "0.4", features = ["std"] }
@ -47,7 +47,7 @@ log = { version = "0.4", features = ["std"] }
# Optional dependencies: # Optional dependencies:
bytemuck = { version = "1.7.1", optional = true } bytemuck = { version = "1.7.1", optional = true }
egui_extras = { version = "0.22.0", path = "../egui_extras", features = [ egui_extras = { version = "0.23.0", path = "../egui_extras", features = [
"image", "image",
] } ] }
rfd = { version = "0.11", optional = true } rfd = { version = "0.11", optional = true }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "egui_demo_lib" name = "egui_demo_lib"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Example library for egui" description = "Example library for egui"
edition = "2021" edition = "2021"
@ -11,7 +11,13 @@ readme = "README.md"
repository = "https://github.com/emilk/egui/tree/master/crates/egui_demo_lib" repository = "https://github.com/emilk/egui/tree/master/crates/egui_demo_lib"
categories = ["gui", "graphics"] categories = ["gui", "graphics"]
keywords = ["glium", "egui", "gui", "gamedev"] keywords = ["glium", "egui", "gui", "gamedev"]
include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"] include = [
"../LICENSE-APACHE",
"../LICENSE-MIT",
"**/*.rs",
"Cargo.toml",
"data/icon.png",
]
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
@ -32,9 +38,9 @@ syntect = ["egui_extras/syntect"]
[dependencies] [dependencies]
egui = { version = "0.22.0", path = "../egui", default-features = false } egui = { version = "0.23.0", path = "../egui", default-features = false }
egui_extras = { version = "0.22.0", path = "../egui_extras" } egui_extras = { version = "0.23.0", path = "../egui_extras" }
egui_plot = { version = "0.22.0", path = "../egui_plot" } egui_plot = { version = "0.23.0", path = "../egui_plot" }
log = { version = "0.4", features = ["std"] } log = { version = "0.4", features = ["std"] }
unicode_names2 = { version = "0.6.0", default-features = false } unicode_names2 = { version = "0.6.0", default-features = false }

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -197,7 +197,7 @@ impl WidgetGallery {
ui.end_row(); ui.end_row();
ui.add(doc_link_label("Image", "Image")); ui.add(doc_link_label("Image", "Image"));
let egui_icon = egui::include_image!("../../assets/icon.png"); let egui_icon = egui::include_image!("../../data/icon.png");
ui.add(egui::Image::new(egui_icon.clone())); ui.add(egui::Image::new(egui_icon.clone()));
ui.end_row(); ui.end_row();

View File

@ -5,6 +5,14 @@ This file is updated upon each release.
Changes since the last release can be found by running the `scripts/generate_changelog.py` script. Changes since the last release can be found by running the `scripts/generate_changelog.py` script.
## 0.23.0 - 2023-09-27
* `egui_extras::install_image_loaders` [#3297](https://github.com/emilk/egui/pull/3297) [#3315](https://github.com/emilk/egui/pull/3315) [#3328](https://github.com/emilk/egui/pull/3328) (thanks [@jprochazk](https://github.com/jprochazk)!)
* Add syntax highlighing feature to `egui_extras` [#3333](https://github.com/emilk/egui/pull/3333) [#3388](https://github.com/emilk/egui/pull/3388)
* Add `TableBuilder::drag_to_scroll` [#3100](https://github.com/emilk/egui/pull/3100) (thanks [@KYovchevski](https://github.com/KYovchevski)!)
* Add opt-in `puffin` feature to `egui-extras` [#3307](https://github.com/emilk/egui/pull/3307)
* Always depend on `log` crate [#3336](https://github.com/emilk/egui/pull/3336)
* Fix not taking clipping into account when calculating column remainder [#3357](https://github.com/emilk/egui/pull/3357) (thanks [@daxpedda](https://github.com/daxpedda)!)
## 0.22.0 - 2023-05-23 ## 0.22.0 - 2023-05-23
- Add option to hide datepicker button calendar icon [#2910](https://github.com/emilk/egui/pull/2910) (thanks [@Barugon](https://github.com/Barugon)!) - Add option to hide datepicker button calendar icon [#2910](https://github.com/emilk/egui/pull/2910) (thanks [@Barugon](https://github.com/Barugon)!)

View File

@ -1,6 +1,6 @@
[package] [package]
name = "egui_extras" name = "egui_extras"
version = "0.22.0" version = "0.23.0"
authors = [ authors = [
"Dominik Rössler <dominik@freshx.de>", "Dominik Rössler <dominik@freshx.de>",
"Emil Ernerfeldt <emil.ernerfeldt@gmail.com>", "Emil Ernerfeldt <emil.ernerfeldt@gmail.com>",
@ -60,7 +60,7 @@ syntect = ["dep:syntect"]
[dependencies] [dependencies]
egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ egui = { version = "0.23.0", path = "../egui", default-features = false, features = [
"serde", "serde",
] } ] }
enum-map = { version = "2", features = ["serde"] } enum-map = { version = "2", features = ["serde"] }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "egui_glium" name = "egui_glium"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Bindings for using egui natively using the glium library" description = "Bindings for using egui natively using the glium library"
edition = "2021" edition = "2021"
@ -36,10 +36,10 @@ links = ["egui-winit/links"]
[dependencies] [dependencies]
egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ egui = { version = "0.23.0", path = "../egui", default-features = false, features = [
"bytemuck", "bytemuck",
] } ] }
egui-winit = { version = "0.22.0", path = "../egui-winit", default-features = false } egui-winit = { version = "0.23.0", path = "../egui-winit", default-features = false }
ahash = { version = "0.8.1", default-features = false, features = [ ahash = { version = "0.8.1", default-features = false, features = [
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead "no-rng", # we don't need DOS-protection, so we let users opt-in to it instead
@ -54,5 +54,5 @@ document-features = { version = "0.2", optional = true }
[dev-dependencies] [dev-dependencies]
egui_demo_lib = { version = "0.22.0", path = "../egui_demo_lib", default-features = false } egui_demo_lib = { version = "0.23.0", path = "../egui_demo_lib", default-features = false }
image = { version = "0.24", default-features = false, features = ["png"] } image = { version = "0.24", default-features = false, features = ["png"] }

View File

@ -5,7 +5,12 @@ This file is updated upon each release.
Changes since the last release can be found by running the `scripts/generate_changelog.py` script. Changes since the last release can be found by running the `scripts/generate_changelog.py` script.
## 0.23.0 - 2023-09-27
* Update `egui`
## 0.22.0 - 2023-05-23 ## 0.22.0 - 2023-05-23
* Update `egui`
## 0.21.0 - 2023-02-08 ## 0.21.0 - 2023-02-08

View File

@ -1,6 +1,6 @@
[package] [package]
name = "egui_glow" name = "egui_glow"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Bindings for using egui natively using the glow library" description = "Bindings for using egui natively using the glow library"
edition = "2021" edition = "2021"
@ -44,7 +44,7 @@ winit = ["egui-winit"]
[dependencies] [dependencies]
egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ egui = { version = "0.23.0", path = "../egui", default-features = false, features = [
"bytemuck", "bytemuck",
] } ] }
@ -59,7 +59,7 @@ document-features = { version = "0.2", optional = true }
# Native: # Native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { version = "0.22.0", path = "../egui-winit", optional = true, default-features = false } egui-winit = { version = "0.23.0", path = "../egui-winit", optional = true, default-features = false }
puffin = { version = "0.16", optional = true } puffin = { version = "0.16", optional = true }
# Web: # Web:

View File

@ -3,3 +3,14 @@ All notable changes to the `egui_plot` integration will be noted in this file.
This file is updated upon each release. This file is updated upon each release.
Changes since the last release can be found by running the `scripts/generate_changelog.py` script. Changes since the last release can be found by running the `scripts/generate_changelog.py` script.
## 0.23.0 - 2023-09-27 - Initial release, after beeing forked out from `egui`
* Draw axis labels and ticks outside of plotting window [#2284](https://github.com/emilk/egui/pull/2284) (thanks [@JohannesProgrammiert](https://github.com/JohannesProgrammiert)!)
* Add `PlotUi::response()` to replace `plot_clicked()` etc [#3223](https://github.com/emilk/egui/pull/3223)
* Add rotation feature to plot images [#3121](https://github.com/emilk/egui/pull/3121) (thanks [@ThundR67](https://github.com/ThundR67)!)
* Plot items: Image rotation and size in plot coordinates, polygon fill color [#3182](https://github.com/emilk/egui/pull/3182) (thanks [@s-nie](https://github.com/s-nie)!)
* Add method to specify `tip_size` of plot arrows [#3138](https://github.com/emilk/egui/pull/3138) (thanks [@nagua](https://github.com/nagua)!)
* Better handle additive colors in plots [#3387](https://github.com/emilk/egui/pull/3387)
* Fix auto_bounds when only one axis has restricted navigation [#3171](https://github.com/emilk/egui/pull/3171) (thanks [@KoffeinFlummi](https://github.com/KoffeinFlummi)!)
* Fix plot formatter not taking closures [#3260](https://github.com/emilk/egui/pull/3260) (thanks [@Wumpf](https://github.com/Wumpf)!)

View File

@ -1,11 +1,7 @@
[package] [package]
name = "egui_plot" name = "egui_plot"
version = "0.22.0" version = "0.23.0"
authors = [ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
"Dominik Rössler <dominik@freshx.de>",
"Emil Ernerfeldt <emil.ernerfeldt@gmail.com>",
"René Rössler <rene@freshx.de>",
]
description = "Immediate mode plotting for the egui GUI library" description = "Immediate mode plotting for the egui GUI library"
edition = "2021" edition = "2021"
rust-version = "1.70" rust-version = "1.70"
@ -32,7 +28,7 @@ serde = ["dep:serde", "egui/serde"]
[dependencies] [dependencies]
egui = { version = "0.22.0", path = "../egui", default-features = false } egui = { version = "0.23.0", path = "../egui", default-features = false }
#! ### Optional dependencies #! ### Optional dependencies

View File

@ -1,6 +1,6 @@
[package] [package]
name = "emath" name = "emath"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Minimal 2D math library for GUI work" description = "Minimal 2D math library for GUI work"
edition = "2021" edition = "2021"

View File

@ -5,6 +5,17 @@ This file is updated upon each release.
Changes since the last release can be found by running the `scripts/generate_changelog.py` script. Changes since the last release can be found by running the `scripts/generate_changelog.py` script.
## 0.23.0 - 2023-09-27
* Update MSRV to Rust 1.70.0 [#3310](https://github.com/emilk/egui/pull/3310)
* Add option to truncate text at wrap width [#3244](https://github.com/emilk/egui/pull/3244) [#3366](https://github.com/emilk/egui/pull/3366)
* Add control of line height and letter spacing [#3302](https://github.com/emilk/egui/pull/3302)
* Support images with rounded corners [#3257](https://github.com/emilk/egui/pull/3257)
* Add `ColorImage::from_gray` [#3166](https://github.com/emilk/egui/pull/3166) (thanks [@thomaseliot](https://github.com/thomaseliot)!)
* Provide `into_inner()` for `egui::mutex::{Mutex, RwLock}` [#3110](https://github.com/emilk/egui/pull/3110) (thanks [@KmolYuan](https://github.com/KmolYuan)!)
* Fix problems with tabs in text [#3355](https://github.com/emilk/egui/pull/3355)
* Refactor: change `ClippedShape` from struct-enum to a normal struct [#3225](https://github.com/emilk/egui/pull/3225)
* Document when `Galley`s get invalidated [#3024](https://github.com/emilk/egui/pull/3024) (thanks [@e00E](https://github.com/e00E)!)
## 0.22.0 - 2023-05-23 ## 0.22.0 - 2023-05-23
* Fix compiling `epaint` without `bytemuck` dependency [#2913](https://github.com/emilk/egui/pull/2913) (thanks [@lunixbochs](https://github.com/lunixbochs)!) * Fix compiling `epaint` without `bytemuck` dependency [#2913](https://github.com/emilk/egui/pull/2913) (thanks [@lunixbochs](https://github.com/lunixbochs)!)

View File

@ -1,6 +1,6 @@
[package] [package]
name = "epaint" name = "epaint"
version = "0.22.0" version = "0.23.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "Minimal 2D graphics library for GUI work" description = "Minimal 2D graphics library for GUI work"
edition = "2021" edition = "2021"
@ -70,8 +70,8 @@ serde = ["dep:serde", "ahash/serde", "emath/serde", "ecolor/serde"]
unity = [] unity = []
[dependencies] [dependencies]
emath = { version = "0.22.0", path = "../emath" } emath = { version = "0.23.0", path = "../emath" }
ecolor = { version = "0.22.0", path = "../ecolor" } ecolor = { version = "0.23.0", path = "../ecolor" }
ab_glyph = "0.2.11" ab_glyph = "0.2.11"
ahash = { version = "0.8.1", default-features = false, features = [ ahash = { version = "0.8.1", default-features = false, features = [

View File

@ -3,7 +3,8 @@
""" """
Summarizes recent PRs based on their GitHub labels. Summarizes recent PRs based on their GitHub labels.
The result can be copy-pasted into CHANGELOG.md, though it often needs some manual editing too. The result can be copy-pasted into CHANGELOG.md,
though it often needs some manual editing too.
""" """
import multiprocessing import multiprocessing
@ -89,7 +90,9 @@ def fetch_pr_info(pr_number: int) -> Optional[PrInfo]:
def get_commit_info(commit: Any) -> CommitInfo: def get_commit_info(commit: Any) -> CommitInfo:
match = re.match(r"(.*) \(#(\d+)\)", commit.summary) match = re.match(r"(.*) \(#(\d+)\)", commit.summary)
if match: if match:
return CommitInfo(hexsha=commit.hexsha, title=str(match.group(1)), pr_number=int(match.group(2))) title = str(match.group(1))
pr_number = int(match.group(2))
return CommitInfo(hexsha=commit.hexsha, title=title, pr_number=pr_number)
else: else:
return CommitInfo(hexsha=commit.hexsha, title=commit.summary, pr_number=None) return CommitInfo(hexsha=commit.hexsha, title=commit.summary, pr_number=None)
@ -104,8 +107,9 @@ def print_section(crate: str, items: List[str]) -> None:
if 0 < len(items): if 0 < len(items):
print(f"#### {crate}") print(f"#### {crate}")
for line in items: for line in items:
line = remove_prefix(line, f"{crate}: ")
line = remove_prefix(line, f"[{crate}] ") line = remove_prefix(line, f"[{crate}] ")
line = remove_prefix(line, f"{crate}: ")
line = remove_prefix(line, f"`{crate}`: ")
print(f"* {line}") print(f"* {line}")
print() print()
@ -152,9 +156,16 @@ def main() -> None:
summary = f"{title} [{hexsha[:7]}](https://github.com/{OWNER}/{REPO}/commit/{hexsha})" summary = f"{title} [{hexsha[:7]}](https://github.com/{OWNER}/{REPO}/commit/{hexsha})"
unsorted_commits.append(summary) unsorted_commits.append(summary)
else: else:
title = pr_info.pr_title if pr_info else title # We prefer the PR title if available # We prefer the PR title if available
title = pr_info.pr_title if pr_info else title
labels = pr_info.labels if pr_info else [] labels = pr_info.labels if pr_info else []
if 'exclude from changlog' in labels:
continue
if 'typo' in labels:
# We get so many typo PRs. Let's not flood the changelog with them.
continue
summary = f"{title} [#{pr_number}](https://github.com/{OWNER}/{REPO}/pull/{pr_number})" summary = f"{title} [#{pr_number}](https://github.com/{OWNER}/{REPO}/pull/{pr_number})"
if INCLUDE_LABELS and 0 < len(labels): if INCLUDE_LABELS and 0 < len(labels):
@ -165,9 +176,6 @@ def main() -> None:
if gh_user_name not in OFFICIAL_DEVS: if gh_user_name not in OFFICIAL_DEVS:
summary += f" (thanks [@{gh_user_name}](https://github.com/{gh_user_name})!)" summary += f" (thanks [@{gh_user_name}](https://github.com/{gh_user_name})!)"
if 'typo' in labels:
continue # We get so many typo PRs. Let's not flood the changelog with them.
added = False added = False
for crate in crate_names: for crate in crate_names: