Skip to content

Commit 307db08

Browse files
HeikoKlaremerks
authored andcommitted
Add N&N for toggle indicator in Windows 11 menus
1 parent 517fd1e commit 307db08

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed
2.16 KB
Loading
2.67 KB
Loading
2.14 KB
Loading

news/4.37/platform.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,28 @@ Additionally, you can use the `Replace With → Clipboard` action to replace the
132132
![Replace Clipboard Context Menu](images/ReplaceClipBoard.png)
133133

134134

135+
### Toggle Indicator in Windows 11 Menus
136+
137+
<details>
138+
<summary>Contributors</summary>
139+
140+
- [Stephan Wahlbrink ](https://github.com/wahlbrink)
141+
</details>
142+
143+
On Windows 11, menu entries that can be toggled do not show their toggle state if they also contain an image.
144+
This affects both checked items as well as radio items.
145+
146+
A workaround was implemented in SWT such that those states are visualized again.
147+
By default, a checkmark or radio bullet is drawn on top of the image if the item is selected.
148+
149+
The behavior may also be configured via the system property `org.eclipse.swt.internal.win32.menu.customSelectionImage`, but note that this property may be subject to change or removal.
150+
This is how it looks with different values of that property:
151+
| System Property Value | 0 (default) | 1 | 2 |
152+
| --- | --- | --- | -- |
153+
| | ![Menu with Overlay Selection Indication](images/menu_state_overlay.png) | ![Menu with Selection Indication Overwriting Image](images/menu_state_noimage.png) | ![Menu with System Behavior Showing No Selection Indication](images/menu_state_system.png) |
154+
155+
156+
135157
---
136158
## Debugger
137159

0 commit comments

Comments
 (0)