Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/emilk/egui into stick-to-…
Browse files Browse the repository at this point in the history
…end-fix
  • Loading branch information
LoganDark committed Nov 10, 2023
2 parents bbcd93b + 59b4eff commit c4909e1
Show file tree
Hide file tree
Showing 171 changed files with 6,870 additions and 3,469 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/
* Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.
Please be patient! I will review you PR, but my time is limited!
Please be patient! I will review your PR, but my time is limited!
-->

Closes <https://github.com/emilk/egui/issues/THE_RELEVANT_ISSUE>.
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
with:
mode: minimum
count: 1
labels: "CI, dependencies, docs and examples, ecolor, eframe, egui_extras, egui_glow, egui_plot, egui-wgpu, egui-winit, egui, epaint, typo"
labels: "CI, dependencies, docs and examples, ecolor, eframe, egui_extras, egui_glow, egui_plot, egui-wgpu, egui-winit, egui, epaint, exclude from changelog, typo"
18 changes: 12 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,22 @@ jobs:
run: cargo check --locked --all-features --all-targets

- name: check egui_extras --all-features
run: cargo check --locked --all-features --all-targets -p egui_extras
run: cargo check --locked --all-features -p egui_extras

- name: check default features
run: cargo check --locked --all-targets

- name: check --no-default-features
run: cargo check --locked --no-default-features --lib --all-targets

- name: check epaint --no-default-features
run: cargo check --locked --no-default-features --lib --all-targets -p epaint

- name: check eframe --no-default-features
run: cargo check --locked --no-default-features --features x11 --lib --all-targets -p eframe
run: cargo check --locked --no-default-features --features x11 --lib -p eframe

- name: check egui_extras --no-default-features
run: cargo check --locked --no-default-features --lib -p egui_extras

- name: check epaint --no-default-features
run: cargo check --locked --no-default-features --lib -p epaint

- name: Test doc-tests
run: cargo test --doc --all-features
Expand All @@ -78,6 +81,9 @@ jobs:
- name: Cranky
run: cargo cranky --all-targets --all-features -- -D warnings

- name: Cranky release
run: cargo cranky --all-targets --all-features --release -- -D warnings

# ---------------------------------------------------------------------------

check_wasm:
Expand All @@ -90,7 +96,7 @@ jobs:
toolchain: 1.70.0
targets: wasm32-unknown-unknown

- run: sudo apt-get update && sudo apt-get install libgtk-3-dev
- run: sudo apt-get update && sudo apt-get install libgtk-3-dev libatk1.0-dev

- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/spelling_and_links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check spelling and links
on: [pull_request]

jobs:
typos:
# https://github.com/crate-ci/typos
# Add exceptions to _typos.toml
# install and run locally: cargo install typos-cli && typos
name: typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4

- name: Check spelling of entire workspace
uses: crate-ci/typos@master
# Disabled: too many names of crates and user-names etc
# spellcheck:
# name: Spellcheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: streetsidesoftware/cspell-action@v2
# with:
# files: "**/*.md"
linkinator:
name: linkinator
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jprochazk/linkinator-action@main
with:
linksToSkip: "https://crates.io/crates/.*, http://localhost:.*" # Avoid crates.io rate-limiting
retry: true
retryErrors: true
retryErrorsCount: 5
retryErrorsJitter: 2000

17 changes: 0 additions & 17 deletions .github/workflows/typos.yml

This file was deleted.

89 changes: 87 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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");

// Include 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)!)
Expand Down Expand Up @@ -244,7 +329,7 @@ Changes since the last release can be found by running the `scripts/generate_cha

### Contributors 🙏
* [4JX](https://github.com/4JX)
* [AlexxxRu](https://github.com/AlexxxRu)
* [a-liashenko](https://github.com/a-liashenko)
* [ascclemens](https://github.com/ascclemens)
* [awaken1ng](https://github.com/awaken1ng)
* [bigfarts](https://github.com/bigfarts)
Expand Down Expand Up @@ -340,7 +425,7 @@ Changes since the last release can be found by running the `scripts/generate_cha
* [4JX](https://github.com/4JX)
* [55nknown](https://github.com/55nknown)
* [AlanRace](https://github.com/AlanRace)
* [AlexxxRu](https://github.com/AlexxxRu)
* [a-liashenko](https://github.com/a-liashenko)
* [awaken1ng](https://github.com/awaken1ng)
* [BctfN0HUK7Yg](https://github.com/BctfN0HUK7Yg)
* [Bromeon](https://github.com/Bromeon)
Expand Down
Loading

0 comments on commit c4909e1

Please sign in to comment.