ZIm/crates/gpui/src/app
Jason Lee 047e7eacec
gpui: Improve window.prompt to support ESC with non-English cancel text on macOS (#29538)
Release Notes:

- N/A

----

The before version GPUI used `Cancel` for cancel text, if we use
non-English text (e.g.: "取消" in Chinese), then the press `Esc` to cancel
will not work.

So this PR to change it by use `PromptButton` to instead the `&str`,
then we can use `PromptButton::cancel("取消")` for the `Cancel` button.

Run `cargo run -p gpui --example window` to test.

---

Platform Test:

- [x] macOS
- [x] Windows
- [x] Linux (x11 and Wayland)

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-05-30 15:26:27 +00:00
..
async_context.rs gpui: Improve window.prompt to support ESC with non-English cancel text on macOS (#29538) 2025-05-30 15:26:27 +00:00
context.rs Misc GPUI Entity<T> cleanups (#28996) 2025-04-17 23:29:19 +00:00
entity_map.rs gpui: Fix race condition when upgrading a weak reference (#30952) 2025-05-30 08:18:25 -07:00
test_context.rs Rename regex search tool to grep and accept an include glob pattern (#29100) 2025-04-20 00:53:30 +00:00