Commit Graph

2886 Commits

Author SHA1 Message Date
Emil Ernerfeldt 9faf4b44ff
Ignore extra SHIFT and ALT when matching modifiers (#3769)
* Closes https://github.com/emilk/egui/issues/3626

Basically, egui now ignores extra SHIFT and ALT pressed when matching
keyboard shortcuts.
This is because SHIFT and ALT are often requires to produce some logical
keys.
For instance, typing `+` on an English keyboard requires pressing `SHIFT
=`,
so the keyboard shortcut looking for `CTRL +` should ignore the SHIFT
key.

@abey79 You reported problem using `Cmd +` and `Cmd -` to zoom - does
this fix it for you?

You can run with `RUST_LOG=egui_winit=trace cargo run` to see a printout
of how winit reports the logical and physical keys, and how egui
interprets them.

Weirdly, on Mac winit reports `SHIFT =` as `+`, but `CMD SHIFT =` as `=`
(on an English keyboard) so things are… difficult.
2024-01-05 10:53:14 +01:00
Frank Lee 1efa660149
Fix IME input of `CompositionEnd` without a `CompositionStart` (#3768)
* Closes https://github.com/emilk/egui/issues/3766

Add support for type in CompositionEnd only characters without trigger
CompositionStart first.
This usually works with no-latin character input.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2024-01-04 15:47:49 +01:00
Emil Ernerfeldt f25e4171b9
Fix: don't open context menu on drag (#3767)
This fixes a bug where the context menu would open when dragging with
the secondary mouse button.

Now the context menu requires a click to open.

This is important for things like plots, where right-click and
right-drag means different things.
2024-01-04 10:29:52 +01:00
Emil Ernerfeldt 34c341444f
Release `egui_plot` 0.24.2 (#3763)
## Changelog
* Fix plot auto-bounds default
[#3722](https://github.com/emilk/egui/pull/3722) (thanks
[@abey79](https://github.com/abey79)!)

---------

Co-authored-by: Antoine Beyeler <49431240+abey79@users.noreply.github.com>
2024-01-03 09:42:56 +01:00
Daniel Buch Hansen e2c1d9f90d
Bump `winit` to `0.29.7` (#3753)
Compiled changelog below:

 - On X11, fix Xft.dpi reload during runtime.
 - On X11, fix window minimize.

- On Web, fix context menu not being disabled by
with_prevent_default(true).
- On Wayland, fix WindowEvent::Destroyed not being delivered after
destroying window.
- Fix EventLoopExtRunOnDemand::run_on_demand not working for consequent
invocation

 - On macOS, remove spurious error logging when handling Fn.
 - On X11, fix an issue where floating point data from the server is
 - misinterpreted during a drag and drop operation.
 - On X11, fix a bug where focusing the window would panic.
 - On macOS, fix refresh_rate_millihertz.
- On Wayland, disable Client Side Decorations when wl_subcompositor is
not supported.
 - On X11, fix Xft.dpi detection from Xresources.
- On Windows, fix consecutive calls to
window.set_fullscreen(Some(Fullscreen::Borderless(None))) resulting in
losing previous window state when eventually exiting fullscreen using
window.set_fullscreen(None).
 - On Wayland, fix resize being sent on focus change.
 - On Windows, fix set_ime_cursor_area.
2024-01-02 07:27:52 +01:00
Emil Ernerfeldt 5cf8a085e3 Document that you need to install additional fonts for asian scripts 2023-12-31 10:27:42 +01:00
Emil Ernerfeldt 12468438a3
`eframe`: Fix building the `wasm32` docs for `docs.rs` (#3757)
* Closes https://github.com/emilk/egui/issues/3756

Fix suggested by @morionelab
2023-12-31 10:26:02 +01:00
Emil Ernerfeldt 9951fe0d36
Fix some clippy 1.75 lints (#3754) 2023-12-30 11:23:21 +01:00
Emil Ernerfeldt 4487f8ff9f
Rename `TextBuffer::replace` to `replace_with` (#3751)
This removes the name conflict with `str::replace`.

* Closes https://github.com/emilk/egui/issues/3746
2023-12-29 17:22:39 +01:00
Emil Ernerfeldt 239ade9a59
Fix crash due to assertion during image loading from http (#3750)
* Closes https://github.com/emilk/egui/issues/3747
2023-12-29 17:20:52 +01:00
Daniel Buch Hansen f4102c05e6
Add missing `ResizeDirection::East` (#3749)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* 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 your PR, but my time is limited!
-->
This adds the missing variant described in below issue.
Closes <https://github.com/emilk/egui/issues/3748>.

If you wish - or even desired - I could look into implement the From
conversion between ResizeDirection and CursorInfo in a seperate PR.

I ran into an issue then running `check.sh` however it seems unrelated
to this PR.
For clarity I'm running Linux, with a wayland compositor.

```bash
~/dev/rust/egui ❯ cargo clean                                                                                                                                                      [add-missing-resizedirection ≡]
~/dev/rust/egui ❯ ./scripts/check.sh                                                                                                                                               [add-missing-resizedirection ≡]
+ cargo install --quiet cargo-cranky
+ cargo install --quiet typos-cli
+ export 'RUSTFLAGS=--cfg=web_sys_unstable_apis -D warnings'
+ RUSTFLAGS='--cfg=web_sys_unstable_apis -D warnings'
+ export 'RUSTDOCFLAGS=-D warnings'
+ RUSTDOCFLAGS='-D warnings'
+ typos
+ ./scripts/lint.py
./scripts/lint.py finished without error
+ cargo fmt --all -- --check
+ cargo doc --quiet --lib --no-deps --all-features
+ cargo doc --quiet --document-private-items --no-deps --all-features
+ cargo cranky --quiet --all-targets --all-features -- -D warnings
+ ./scripts/clippy_wasm.sh
+ export CLIPPY_CONF_DIR=scripts/clippy_wasm
+ CLIPPY_CONF_DIR=scripts/clippy_wasm
+ cargo cranky --quiet --all-features --target wasm32-unknown-unknown --target-dir target_wasm -p egui_demo_app --lib -- --deny warnings
+ cargo check --quiet --all-targets
+ cargo check --quiet --all-targets --all-features
+ cargo check --quiet -p egui_demo_app --lib --target wasm32-unknown-unknown
+ cargo check --quiet -p egui_demo_app --lib --target wasm32-unknown-unknown --all-features
+ cargo test --quiet --all-targets --all-features

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 4 tests
i...
test result: ok. 3 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 14 tests
..............
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s


running 1 test
.
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 3 tests
...
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.52s

Testing demo_with_tessellate__realistic
Success

Testing demo_no_tessellate
Success

Testing demo_only_tessellate
Success

Testing label &str
Success

Testing label format!
Success

Testing Painter::rect
Success

Testing text_layout_uncached
Success

Testing text_layout_cached
Success

Testing tessellate_text
Success


running 3 tests
...
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 1 test
.
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 7 tests
.......
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 23 tests
.......................
test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.20s

Testing single_dashed_lines
Success

Testing many_dashed_lines
Success

Testing tessellate_circles_100k
Success


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

+ cargo test --quiet --doc

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 4 tests
....
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.26s


running 146 tests
........................................................................................ 88/146
i.........................................................
test result: ok. 145 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 108.27s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 5 tests
iiii.
test result: ok. 1 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 3.65s


running 5 tests
.....
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 11.99s


running 2 tests
..
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s


running 5 tests
ii...
test result: ok. 3 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 2.53s


running 11 tests
...........
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.38s


running 5 tests
i....
test result: ok. 4 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 1.01s

+ cd crates/eframe
+ cargo check --quiet --no-default-features --features glow
+ cd crates/eframe
+ cargo check --quiet --no-default-features --features wgpu
error: The platform you're compiling for is not supported by winit
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/platform_impl/mod.rs:67:1
   |
67 | compile_error!("The platform you're compiling for is not supported by winit");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0432]: unresolved import `self::platform`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/platform_impl/mod.rs:26:15
   |
26 | pub use self::platform::*;
   |               ^^^^^^^^ could not find `platform` in `self`

error[E0432]: unresolved import `crate::platform_impl::PlatformIcon`
 --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/icon.rs:1:5
  |
1 | use crate::platform_impl::PlatformIcon;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `PlatformIcon` in `platform_impl`

error[E0433]: failed to resolve: could not find `DeviceId` in `platform_impl`
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/event.rs:616:42
    |
616 |         DeviceId(unsafe { platform_impl::DeviceId::dummy() })
    |                                          ^^^^^^^^ could not find `DeviceId` in `platform_impl`

error[E0433]: failed to resolve: could not find `WindowId` in `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/window.rs:99:42
   |
99 |         WindowId(unsafe { platform_impl::WindowId::dummy() })
   |                                          ^^^^^^^^ could not find `WindowId` in `platform_impl`

error[E0433]: failed to resolve: could not find `Window` in `platform_impl`
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/window.rs:513:28
    |
513 |             platform_impl::Window::new(&window_target.p, self.window, self.platform_specific)?;
    |                            ^^^^^^ could not find `Window` in `platform_impl`

error[E0412]: cannot find type `OsError` in module `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/error.rs:28:27
   |
28 |     error: platform_impl::OsError,
   |                           ^^^^^^^ not found in `platform_impl`
   |
help: there is an enum variant `crate:🪟:BadIcon::OsError`; try using the variant's enum
   |
28 |     error: crate:🪟:BadIcon,
   |            ~~~~~~~~~~~~~~~~~~~~~~

error[E0412]: cannot find type `OsError` in module `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/error.rs:62:76
   |
62 |     pub(crate) fn new(line: u32, file: &'static str, error: platform_impl::OsError) -> OsError {
   |                                                                            ^^^^^^^ not found in `platform_impl`
   |
help: there is an enum variant `crate:🪟:BadIcon::OsError`; try using the variant's enum
   |
62 |     pub(crate) fn new(line: u32, file: &'static str, error: crate:🪟:BadIcon) -> OsError {
   |                                                             ~~~~~~~~~~~~~~~~~~~~~~

error[E0412]: cannot find type `DeviceId` in module `platform_impl`
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/event.rs:602:47
    |
602 | pub struct DeviceId(pub(crate) platform_impl::DeviceId);
    |                                               ^^^^^^^^ not found in `platform_impl`

error[E0412]: cannot find type `KeyEventExtra` in module `platform_impl`
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/event.rs:787:50
    |
787 |     pub(crate) platform_specific: platform_impl::KeyEventExtra,
    |                                                  ^^^^^^^^^^^^^ not found in `platform_impl`

error[E0412]: cannot find type `EventLoop` in module `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/event_loop.rs:41:43
   |
41 |     pub(crate) event_loop: platform_impl::EventLoop<T>,
   |                                           ^^^^^^^^^ not found in `platform_impl`
   |
help: consider importing this struct
   |
10 + use calloop::EventLoop;
   |
help: if you import `EventLoop`, refer to it directly
   |
41 -     pub(crate) event_loop: platform_impl::EventLoop<T>,
41 +     pub(crate) event_loop: EventLoop<T>,
   |

error[E0412]: cannot find type `EventLoopWindowTarget` in module `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/event_loop.rs:52:34
   |
52 |     pub(crate) p: platform_impl::EventLoopWindowTarget<T>,
   |                                  ^^^^^^^^^^^^^^^^^^^^^ not found in `platform_impl`

error[E0412]: cannot find type `PlatformSpecificEventLoopAttributes` in module `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/event_loop.rs:62:50
   |
62 |     pub(crate) platform_specific: platform_impl::PlatformSpecificEventLoopAttributes,
   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `platform_impl`

error[E0433]: failed to resolve: could not find `EventLoop` in `platform_impl`
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/event_loop.rs:128:40
    |
128 |             event_loop: platform_impl::EventLoop::new(&mut self.platform_specific)?,
    |                                        ^^^^^^^^^ could not find `EventLoop` in `platform_impl`
    |
help: consider importing this struct
    |
10  + use calloop::EventLoop;
    |
help: if you import `EventLoop`, refer to it directly
    |
128 -             event_loop: platform_impl::EventLoop::new(&mut self.platform_specific)?,
128 +             event_loop: EventLoop::new(&mut self.platform_specific)?,
    |

error[E0412]: cannot find type `EventLoopProxy` in module `platform_impl`
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/event_loop.rs:394:38
    |
394 |     event_loop_proxy: platform_impl::EventLoopProxy<T>,
    |                                      ^^^^^^^^^^^^^^ not found in `platform_impl`

error[E0412]: cannot find type `VideoMode` in module `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/monitor.rs:18:43
   |
18 |     pub(crate) video_mode: platform_impl::VideoMode,
   |                                           ^^^^^^^^^ not found in `platform_impl`

error[E0412]: cannot find type `MonitorHandle` in module `platform_impl`
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/monitor.rs:104:38
    |
104 |     pub(crate) inner: platform_impl::MonitorHandle,
    |                                      ^^^^^^^^^^^^^ not found in `platform_impl`

error[E0412]: cannot find type `VideoMode` in this scope
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/platform_impl/mod.rs:31:15
   |
31 |     Exclusive(VideoMode),
   |               ^^^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
1  + use crate::monitor::VideoMode;
   |

error[E0412]: cannot find type `MonitorHandle` in this scope
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/platform_impl/mod.rs:32:23
    |
32  |     Borderless(Option<MonitorHandle>),
    |                       ^^^^^^^^^^^^^
    |
   ::: /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/monitor.rs:103:1
    |
103 | pub struct MonitorHandle {
    | ------------------------ similarly named struct `RootMonitorHandle` defined here
    |
help: a struct with a similar name exists
    |
32  |     Borderless(Option<RootMonitorHandle>),
    |                       ~~~~~~~~~~~~~~~~~
help: consider importing this struct
    |
1   + use crate::monitor::MonitorHandle;
    |

error[E0412]: cannot find type `Window` in module `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/window.rs:55:39
   |
55 |     pub(crate) window: platform_impl::Window,
   |                                       ^^^^^^ not found in `platform_impl`

error[E0412]: cannot find type `WindowId` in module `platform_impl`
  --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/window.rs:85:47
   |
85 | pub struct WindowId(pub(crate) platform_impl::WindowId);
   |                                               ^^^^^^^^ not found in `platform_impl`

error[E0412]: cannot find type `PlatformSpecificWindowBuilderAttributes` in module `platform_impl`
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/window.rs:123:50
    |
123 |     pub(crate) platform_specific: platform_impl::PlatformSpecificWindowBuilderAttributes,
    |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `platform_impl`

error[E0282]: type annotations needed
   --> /home/dbuch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.4/src/window.rs:537:17
    |
537 |         builder.build(event_loop)
    |                 ^^^^^ cannot infer type of the type parameter `T` declared on the method `build`
    |
help: consider specifying the generic argument
    |
537 |         builder.build::<T>(event_loop)
    |                      +++++

Some errors have detailed explanations: E0282, E0412, E0432, E0433.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `winit` (lib) due to 23 previous errors
~/dev/rust/egui ❯                                                                                                                                                                  [add-missing-resizedirection ≡]
```
2023-12-29 16:59:29 +01:00
Emil Ernerfeldt e44f54f81f
Fix text color of disabled widgets (#3744)
* Introduced recently in https://github.com/emilk/egui/pull/3727
* Closes https://github.com/emilk/egui/issues/3732
2023-12-28 11:16:39 +01:00
Emil Ernerfeldt 9dbfb8ce4e Make check.sh more quiet 2023-12-28 10:38:07 +01:00
Emil Ernerfeldt 790b401adf Add -g option to build_demo_web.sh 2023-12-28 10:36:07 +01:00
Emil Ernerfeldt d978b37732 Improve CONTRIBUTING.md 2023-12-28 09:33:16 +01:00
Marijn Suijten 5b591d26f6
Add `Key::Cut`, `Key::Copy`, `Key::Paste` (#3725)
The comment added in commit 8a0bc97e ("[egui_glium] Fix paste") seems to
assume that `winit` "should have translated" common "paste" keyboard
combos to a `Cut`/`Copy`/`Paste` "KeyCode", but completely glossed over
the fact that this `KeyCode` (now also `NamedKey`) maps to a special key
dedicated to this purpose found on some keyboards and OSes. Make sure
that this key is still handled in addition to the combo that is
detected.

---

Note that this PR does not compile as it is (and I have hence not tested
this nor even ran into this limitation), just noticed this inconsistency
while failing to understand a code comment. We'd have to decide if the
variants should be added to `egui::Key` or if these helper functions
need to take `winit` keys (`ScanCode` or `NamedKey`) directly?

I should have an old keyboard with a physical paste key in a drawer
somewhere. And on Android there are special copy/paste events that can
be sent by a virtual keyboard or the debug shell, so that this can be
properly tested before it is merged.
(Except that the current `clipboard` implementation is not supported on
Android)
2023-12-25 19:02:02 +01:00
Arnold Loubriat c3a9355279
Fix: Let `accesskit` process window events (#3733)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* 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 your PR, but my time is limited!
-->

Since accesskit_winit version 0.15.0, it is necessary to call
`Adapter::process_events` to let AccessKit fire up window focus events
on Unix and macOS. Furthermore this has always been needed on Unix (X11
only) to let AccessKit know about the window bounds, which is needed to
perform hit-testing on nodes.
2023-12-25 19:01:05 +01:00
Emil Ernerfeldt 0a6ea15f6c
impl `Clone` for `Fonts` (#3737)
Closes https://github.com/emilk/egui/issues/3731
2023-12-25 19:00:54 +01:00
Oscar Gustafsson fc18d6f8f4
Add support for dashed lines with offset (#3720)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* 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 your PR, but my time is limited!
-->

Closes <https://github.com/emilk/egui/issues/3677>.

This can naturally be obtained by starting the drawing a bit "later",
but providing support for this directly will simplify interleaved
drawing of dashed lines.

An even more general approach would be to allow passing an even-length
vector of lengths and gaps, in addition to offset. Primarily thinking if
it is better to go even further if a new dashed-line-method is
introduced. The second commit introduce this (I can naturally squash
these!).
2023-12-23 16:17:04 +01:00
Wybe Westra 76025f2c15
Fix: `Grid` now follows `style.visuals.striped` setting if not explicitly overwritten (#3723)
The docs of
[`Visuals.striped`](https://docs.rs/egui/latest/egui/style/struct.Visuals.html#structfield.striped)
mention that they control the default striping of Grid. However, this
seems to be broken.

This pr makes the Grid follow the striped setting if it doesn't yet have
a row coloring set.
2023-12-23 15:58:48 +01:00
Antoine Beyeler 365a8d2240
Fix `Window` positioning bug when bad `pivot` is stored in app data (#3721)
This PR fixes an issue where a bad pivot stored in app state would
override the pivot actually set from code. The root code of this issue
if the `Window`'s `State` containing `pivot` in the first place, as
`pivot` is not part of a state to be tracked. It makes the `State`
structure more ergonomic though, so this PR leaves the `pivot` field but
always overrides it with the value provided by user code.

#### Repro of the original issue

This issue can be reproduced using the `re_ui_example` app from the
Rerun repo, at this commit:
fb5add0047.
By using this `app.ron` file, the bug will appear:

```
{
    "egui": "(
      areas:{
            ((0)):(
                areas:{
                    (13430889033718688666):(pivot_pos:(x:565.5,y:328.0),pivot:((Min,Min)),size:(x:364.0,y:75.5),interactable:true),
                },
            )
        }
    )",
}
```

The modal is entered based on it's top-left corner even though the code
actually specifies a center-center pivot:

<img width="1312" alt="image"
src="https://github.com/emilk/egui/assets/49431240/6df1a8bb-d1ea-4e15-866c-5f14138dda0e">

With this PR, the centring is correct even with the "poisoned"
`app.ron`:

<img width="1312" alt="image"
src="https://github.com/emilk/egui/assets/49431240/7f50b2d4-9245-48f3-91de-c747bbc8c40e">
2023-12-23 15:53:40 +01:00
Emil Ernerfeldt ffcc3f066c Typos and doc improvements 2023-12-22 17:33:01 +01:00
Emil Ernerfeldt 0561fcaba9
Replace a special `Color32::PLACEHOLDER` with widget fallback color (#3727)
This introduces a special `Color32::PLACEHOLDER` which, during text
painting, will be replaced with `TextShape::fallback_color`.

The fallback color is mandatory to set in all text painting. Usually
this comes from the current visual style.

This lets users color only parts of a `WidgetText` (using e.g. a
`LayoutJob` or a `Galley`), where the uncolored parts (using
`Color32::PLACEHOLDER`) will be replaced by a default widget color (e.g.
blue for a hyperlink).

For instance, you can color the `⚠️`-emoji red in a piece of text red
and leave the rest of the text uncolored. The color of the rest of the
text will then depend on wether or not you put that text in a label, a
button, or a hyperlink.

Overall this simplifies a lot of complexity in the code but comes with a
few breaking changes:

* `TextShape::new`, `Shape::galley`, and `Painter::galley` now take a
fallback color by argument
* `Shape::galley_with_color` has been deprecated (use `Shape::galley`
instead)
* `Painter::galley_with_color` has been deprecated (use
`Painter::galley` instead)
* `WidgetTextGalley` is gone (use `Arc<Galley>` instead)
* `WidgetTextJob` is gone (use `LayoutJob` instead)
* `RichText::into_text_job` has been replaced with
`RichText::into_layout_job`
* `WidgetText::into_text_job` has been replaced with
`WidgetText::into_layout_job`
2023-12-22 15:09:10 +01:00
Emil Ernerfeldt e36b981118
Add @Bromeon and @EmbersArc as CODEOWNERS for egui_plot (#3711)
Please take a look @Bromeon and @EmbersArc!

You have both contributed substantially to `egui_plot` (more than I
have).
This is me inviting you to co-maintain the `egui_plot` crate.
If you accept, you'll get a notification when someone opens a PR
touching `egui_plot`, and you can review and merge it as you see fit.
You can also merge your own egui_plot PRs without waiting on me to
review them.
2023-12-21 09:08:16 +01:00
PingPongun 963be247f2
Update resvg dependency of egui_extras (#3719)
Update `resvg` from v0.28 to v0.37. 
Remove related, unnecessary entries from `deny.toml`.

⚠ In example `images` ferris is scaled differently, but I guess that now
it scales in expected way (takes all available space; before this PR it
takes up to space that, was available at first render- it does not
upscale).

This PR is minimal adaptation to new `resvg` api and small related
simplification, however it should be considered to update loaders
(currently if svg image initially was small and was scaled up it will be
blurred, see https://github.com/emilk/egui/issues/3501). As svg image
now scales over render size, problem will be more often seen now.

(currently `SvgLoader` theoretically should rerender for different sizes
(but I guess it will result in memory leak in that case), but refreshing
is stopped earlier in `DefaultTextureLoader`).

I have initial version of loaders update, that will fix issue with svg
scaling (and also enable e.g. reloading image if file has been changed),
I will submit these changes in separate PR once this one is merged.

Closes <https://github.com/emilk/egui/issues/3652>.
2023-12-20 08:09:03 +01:00
Antoine Beyeler add1695624
Fix plot auto-bounds unset by default (#3722)
These PR recently cleaned up the code around auto-bounds, but introduced
an involuntary change whereby auto-bounds would not be enabled by
default. All plots would default to being not properly centred as a
result.

- #3587
- #3586

This PR changes the default back to enabled. It also deprecates
`auto_bounds_x()` and `auto_bounds_y()`, which could only enable
auto-bounds (which is not very useful as auto-bounds were, and now are
again, enabled by default). A new `auto_bounds()` API can now be sued to
disable auto-bounds if needed.

Fixes #3712 
Fixes https://github.com/rerun-io/rerun/issues/4503
2023-12-19 17:58:59 +01:00
Emil Ernerfeldt 9253cafedd
`eframe`: If both `glow` and `wgpu` features are enabled, default to `wgpu` (#3717)
By default, only the `glow` feature is enabled, so if the user added
`wgpu` to the feature list they probably wanted to use `wgpu`.
2023-12-19 09:51:05 +01:00
Emil Ernerfeldt 4a2cafee7c Add a TODO 2023-12-18 17:28:47 +01:00
Emil Ernerfeldt 25903d0a02 Add `TexturePoll::texture_id` 2023-12-18 17:28:47 +01:00
Emil Ernerfeldt 4060d02f27 Add a bunch of `#[inline]` 2023-12-18 17:28:47 +01:00
crispy-strawberry a726e656a4
Very small typo fix (#3693)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* 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 your PR, but my time is limited!
-->

Small spelling error - changed `Addintional` to `Additional`
2023-12-18 15:43:09 +01:00
Emil Ernerfeldt 449678e617
Update to glow 0.13 (#3715) 2023-12-18 15:15:20 +01:00
Fredrik Fornwall 8e5959d55d
Update to winit 0.29 (#3649)
* Closes https://github.com/emilk/egui/issues/3542
* Closes https://github.com/emilk/egui/issues/2977
* Closes https://github.com/emilk/egui/issues/3303

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-12-18 14:53:14 +01:00
Emil Ernerfeldt 8503a85113
Bug fix: framebuffer clear when using glow with multi-viewports (#3713)
I broke this in https://github.com/emilk/egui/pull/3665

For some reason, when using multiple viewports, the first "clear"
doesn't take.

I don't have time to investigate further, so I am adding a hack here
which:

* For single-viewport apps, the clear is done before `App::update` so
user can paint there
* For multi-viewport apps, the clear is done after `App::update`, so
that it works

This means painting in `App::update` won't work with multi-viewports.

Ideally, users should use paint callbacks instead of painting directly
in `App::update` anyways.
2023-12-18 12:47:23 +01:00
Emil Ernerfeldt 81a47066c6 Add link to `egui-ash` in README.md
Closes https://github.com/emilk/egui/issues/3706
2023-12-18 10:07:50 +01:00
zeozeozeo 3361d399fb
derive serde Serialize and Deserialize on `KeyboardShortcut` (#3694)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* 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 your PR, but my time is limited!
-->

This is a very simple change so you don't have to do this:
https://github.com/zeozeozeo/egui-keybind/blob/master/src/bind.rs#L149-L172
2023-12-18 09:48:16 +01:00
dependabot[bot] 60f46f7c40
Bump zerocopy from 0.7.21 to 0.7.31 (#3707)
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.21 to
0.7.31.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/zerocopy/releases">zerocopy's
releases</a>.</em></p>
<blockquote>
<h2>v0.7.30</h2>
<h2>What's Changed</h2>
<ul>
<li>[policies] Document yanking policy by <a
href="https://github.com/joshlf"><code>@​joshlf</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/677">google/zerocopy#677</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/680">google/zerocopy#680</a></li>
<li>[readme] Link to GitHub Releases (<a
href="https://redirect.github.com/google/zerocopy/issues/692">#692</a>)
by <a href="https://github.com/joshlf"><code>@​joshlf</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/693">google/zerocopy#693</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/zerocopy/compare/v0.7.29...v0.7.30">https://github.com/google/zerocopy/compare/v0.7.29...v0.7.30</a></p>
<h2>v0.7.29</h2>
<h2>What's Changed</h2>
<ul>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/664">google/zerocopy#664</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/668">google/zerocopy#668</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/669">google/zerocopy#669</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/670">google/zerocopy#670</a></li>
<li>Implement <code>TryFromBytes</code> for <code>[T]</code> by <a
href="https://github.com/jswrenn"><code>@​jswrenn</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/666">google/zerocopy#666</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/673">google/zerocopy#673</a></li>
<li>[derive] Fix AsBytes for <code>#[repr(C, packed(N))]</code> by <a
href="https://github.com/maurer"><code>@​maurer</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/672">google/zerocopy#672</a></li>
<li>Release 0.7.29 by <a
href="https://github.com/joshlf"><code>@​joshlf</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/676">google/zerocopy#676</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/zerocopy/compare/v0.7.28...v0.7.29">https://github.com/google/zerocopy/compare/v0.7.28...v0.7.29</a></p>
<h2>v0.7.28</h2>
<h2>What's Changed</h2>
<ul>
<li>Improve <code>transmute*!</code> documentation by <a
href="https://github.com/jswrenn"><code>@​jswrenn</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/661">google/zerocopy#661</a></li>
<li>Improve <code>AsBytes</code> documentation by <a
href="https://github.com/jswrenn"><code>@​jswrenn</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/660">google/zerocopy#660</a></li>
<li>[docs] Fix typo in include_value! doc comment by <a
href="https://github.com/joshlf"><code>@​joshlf</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/662">google/zerocopy#662</a></li>
<li>Release 0.7.28 by <a
href="https://github.com/joshlf"><code>@​joshlf</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/663">google/zerocopy#663</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/zerocopy/compare/v0.7.27...v0.7.28">https://github.com/google/zerocopy/compare/v0.7.27...v0.7.28</a></p>
<h2>v0.7.27</h2>
<h2>What's Changed</h2>
<ul>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/618">google/zerocopy#618</a></li>
<li>Safety comments quote new bit validity guarantees by <a
href="https://github.com/joshlf"><code>@​joshlf</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/462">google/zerocopy#462</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/621">google/zerocopy#621</a></li>
<li>[CI] Bump github/codeql-action from 2.22.6 to 2.22.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/622">google/zerocopy#622</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/623">google/zerocopy#623</a></li>
<li>[CI] Bump step-security/harden-runner from 2.6.0 to 2.6.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/625">google/zerocopy#625</a></li>
<li>[ci] Roll pinned stable toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/624">google/zerocopy#624</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/626">google/zerocopy#626</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/628">google/zerocopy#628</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/629">google/zerocopy#629</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/631">google/zerocopy#631</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/634">google/zerocopy#634</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/635">google/zerocopy#635</a></li>
<li>[CI] Bump github/codeql-action from 2.22.7 to 2.22.8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/google/zerocopy/pull/636">google/zerocopy#636</a></li>
<li>[ci] Roll pinned nightly toolchain by <a
href="https://github.com/google-pr-creation-bot"><code>@​google-pr-creation-bot</code></a>
in <a
href="https://redirect.github.com/google/zerocopy/pull/637">google/zerocopy#637</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/google/zerocopy/blob/main/CHANGELOG.md">zerocopy's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>Releases</h2>
<p>We track releases and release notes using <a
href="https://github.com/google/zerocopy/releases">GitHub
Releases</a>.</p>
<h2>Yanks and Regressions</h2>
<h3>0.7.27, 0.7.28</h3>
<p>These versions were briefly yanked due to a non-soundness regression
reported in
<a
href="https://redirect.github.com/google/zerocopy/issues/672">#672</a><a
href="https://redirect.github.com/google/zerocopy/pull/672">pull-672</a>.
After reconsidering our yanking policy in <a
href="https://redirect.github.com/google/zerocopy/issues/679">#679</a><a
href="https://redirect.github.com/google/zerocopy/issues/679">issue-679</a>,
we un-yanked these versions.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7d3a8f9ea6"><code>7d3a8f9</code></a>
Fix soundness hole in Ref::into_ref and into_mut (<a
href="https://redirect.github.com/google/zerocopy/issues/721">#721</a>)</li>
<li><a
href="961612f110"><code>961612f</code></a>
[readme] Link to GitHub Releases (<a
href="https://redirect.github.com/google/zerocopy/issues/692">#692</a>)
(<a
href="https://redirect.github.com/google/zerocopy/issues/693">#693</a>)</li>
<li><a
href="449b78c67f"><code>449b78c</code></a>
[ci] Roll pinned nightly toolchain (<a
href="https://redirect.github.com/google/zerocopy/issues/680">#680</a>)</li>
<li><a
href="8f7d88b90e"><code>8f7d88b</code></a>
[policies] Document yanking policy (<a
href="https://redirect.github.com/google/zerocopy/issues/677">#677</a>)</li>
<li><a
href="5b76223e0e"><code>5b76223</code></a>
Release 0.7.29 (<a
href="https://redirect.github.com/google/zerocopy/issues/676">#676</a>)</li>
<li><a
href="941c83fb4c"><code>941c83f</code></a>
[derive] Fix AsBytes for <code>#[repr(C, packed(N))]</code> (<a
href="https://redirect.github.com/google/zerocopy/issues/672">#672</a>)</li>
<li><a
href="d18d233cf4"><code>d18d233</code></a>
[ci] Roll pinned nightly toolchain (<a
href="https://redirect.github.com/google/zerocopy/issues/673">#673</a>)</li>
<li><a
href="ac0c27e775"><code>ac0c27e</code></a>
implement <code>TryFromBytes</code> for <code>[T]</code> (<a
href="https://redirect.github.com/google/zerocopy/issues/666">#666</a>)</li>
<li><a
href="122828ed8a"><code>122828e</code></a>
[ci] Roll pinned nightly toolchain (<a
href="https://redirect.github.com/google/zerocopy/issues/670">#670</a>)</li>
<li><a
href="980dd98f9a"><code>980dd98</code></a>
[ci] Roll pinned nightly toolchain (<a
href="https://redirect.github.com/google/zerocopy/issues/669">#669</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/google/zerocopy/compare/v0.7.21...v0.7.31">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zerocopy&package-manager=cargo&previous-version=0.7.21&new-version=0.7.31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/emilk/egui/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 09:47:20 +01:00
Emil Ernerfeldt c8dd3dd01a
Update dependencies (#3700)
Also disable `regex` `env_logger` feature in examples to improve compile
times.
2023-12-12 12:59:40 +01:00
Emil Ernerfeldt 8d4de866d4
Remove deprecated functions (#3692) 2023-12-08 11:02:57 +01:00
Emil Ernerfeldt b1721a3ce7
Release `egui_extras` 0.24.2 - Fix `Table` scrolling bug (#3691)
Includes:
* https://github.com/emilk/egui/pull/3690

---------

Co-authored-by: Antoine Beyeler <49431240+abey79@users.noreply.github.com>
2023-12-08 10:32:06 +01:00
Antoine Beyeler d8a795598f
Fix `egui_extras::Table` scrolling bug (#3690)
`egui_extras::Table` now uses the clip rectangle to decide which rows to
draw when using `TableBody::rows()`.

- Closes #3682
- Closes #3670
2023-12-08 09:08:27 +01:00
Brian Janssen 4e75f4313e
Fix typos in viewports docs (`then` vs `than`) (#3681)
I looked through the new viewport docs and noticed these small typos.
This PR fixes them.
2023-12-05 16:38:21 +01:00
Emil Ernerfeldt a4e389431d
Simplify `egui_winit::State` (#3678)
By storing a clone of the egui context in it, we can be sure to always
use the correct `pixels_per_point`
2023-12-05 11:45:25 +01:00
Emil Ernerfeldt 80d7143b15
Log all available wgpu adapters during startup (#3671)
Useful when debugging, e.g. if the default choice is one of many, and
perhaps the other ones would be better.

**EDIT**: Oh, `enumerate_adapters` doesn't work on web… will fix.
2023-12-04 15:59:13 +01:00
Sebastian Urban 36c6b6304d
Make glow Send + Sync again. (#3646)
* Reverts #3598
* Closes #3645
2023-12-04 15:58:05 +01:00
Emil Ernerfeldt 84a6d6f2ab Fix code example in `egui_demo_lib` 2023-11-30 17:53:34 +01:00
Emil Ernerfeldt d17613c242 Release 0.24.1 - Bug fixes 2023-11-30 17:46:25 +01:00
Emil Ernerfeldt 8ccd9b73e2 Make sure `check.sh` installs all tools it uses 2023-11-30 17:45:15 +01:00
Emil Ernerfeldt be1f6cd699 Use `panic = "abort"` for slightly faster compilation 2023-11-30 17:28:33 +01:00
Emil Ernerfeldt 4b1523ad51
eframe glow backend: Clear render target before calling `App::update` (#3665)
* Closes https://github.com/emilk/egui/issues/3659
2023-11-30 16:37:16 +01:00