egui/crates
Aufar Zakiev 01597fe1a1
`Response.context_menu` now returns the response of the context menu, if open (#3904)
Hi everyone! It's a great pleasure to work with such a library. It feels
like a breath of fresh air!

**Problem:**

The current implementation of `context_menu` consumes `self` and returns
it. However, the underlying `menu::context_menu` requires only a
reference to `self`, so it is safe to change the `context_menu`
signature.

**Fix:**

1. Change signature to take a ref to `self`. 
2. Return the `Option<InnerResponse<()>>` from the underlying method
call

**Pros:**

1. No `let response =  response.context_menu(|| {...})` pattern
2. Better consistency with other `show`-like methods, as it is in the
`Window::show`
3. Less ownership gymnastics

**Cons:**
1. Breaking change
2. Smth else what I don't see ?

**Additional info:**
- This method is also addressed in [this
PR](https://github.com/emilk/egui/pull/857).
- `check.sh` fails only on `cargo check --quiet -p eframe
--no-default-features --features wgpu` with `"The platform you're
compiling for is not supported by winit"` error, should it be launched
at all ?
2024-01-29 23:07:16 +01:00
..
ecolor Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
eframe Much more accurate `cpu_usage` timing (#3913) 2024-01-29 19:12:16 +01:00
egui `Response.context_menu` now returns the response of the context menu, if open (#3904) 2024-01-29 23:07:16 +01:00
egui-wgpu Postpone call to get_current_texture (#3914) 2024-01-29 18:06:21 +01:00
egui-winit Postpone call to get_current_texture (#3914) 2024-01-29 18:06:21 +01:00
egui_demo_app Much more accurate `cpu_usage` timing (#3913) 2024-01-29 19:12:16 +01:00
egui_demo_lib Add drag-and-drop APIs with payloads storage (#3887) 2024-01-29 11:14:18 +01:00
egui_extras Use a selectable label for syntax-highlighted text in egui_extras 2024-01-22 14:47:58 +01:00
egui_glow Update wgpu to 0.19 (#3824) 2024-01-19 10:14:13 +01:00
egui_plot Change default plot line thickness from 1.0 to 1.5 (#3918) 2024-01-29 19:23:27 +01:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Cross-widget text select (#3870) 2024-01-24 15:45:22 +01:00
epaint Fix text selection crashes 2024-01-24 15:47:44 +01:00