# gpui: Add \`disabled\` state to app menu items \(\#44191\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/61c2a4334ca884ed0070bde239902ae3c81aba21)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 61c2a4334ca884ed0070bde239902ae3c81aba21

Requested commit: 61c2a4334ca884ed0070bde239902ae3c81aba21

Commit: 61c2a4334ca884ed0070bde239902ae3c81aba21

Tree: bb9012194236fbda2606d91e3b76707ae9276429

Author: Jason Lee

Committer: GitHub

## Message

````
gpui: Add `disabled` state to app menu items (#44191)

Continue #39876 to add `disabled` state to `MenuItem`.

Make this change for #44047 ready to have disabled state.

1. Add `disabled` state to `MenuItem`.
2. Add some builder methods to `Menu` and `MenuItem`.
3. Improve `set_menus` method to receive a `impl IntoIterator<Item =
Menu>`.

Release Notes:

- N/A

--

<img width="294" height="204" alt="image"
src="https://github.com/user-attachments/assets/688e0db8-6c4e-4f9b-a832-8228db0e95d8"
/>

```bash
cargo run -p gpui --example set_menus
```
````

## Parents

- [d1177dc43c397c4f96d4f8cd046dbdf5e092bc64](https://git.cafe/gitcafe/zed/commit/d1177dc43c397c4f96d4f8cd046dbdf5e092bc64?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/61c2a4334ca884ed0070bde239902ae3c81aba21?format=markdown)
