mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 14:49:06 -04:00
Release 0.23.0 - New image API
This commit is contained in:
85
CHANGELOG.md
85
CHANGELOG.md
@@ -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.
|
||||
|
||||
|
||||
## 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
|
||||
### ⭐ Added
|
||||
* Scroll bar visibility options [#2729](https://github.com/emilk/egui/pull/2729) (thanks [@IVAN-MK7](https://github.com/IVAN-MK7)!)
|
||||
|
||||
Reference in New Issue
Block a user