You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Windows 11] MenuItem with style SWT.CHECK and image doesn't show state #501
It seems that on Win11, theme decided to no longer paint blue square around the icon, hence the difference. I would say that the other problem here is that the image is always painted, whether checked or not.
Studied the code more. It turns out that check and image are independent things. SWT even tries to manipulate MNS_CHECKORBMP style in attempt to save space when menu only has images and no checks.
However, since XP theming, Windows seems to ignore that; it always paints check and image at the same spot.
Here's a screenshot of a native snippet on Win7, using disable visual themes compatibility flag. On the left, flag is enabled (that is, XP theming disabled). On the right, flag is disabled (that is, XP theming enabled). The "up arrow" image is just a random image I grabbed.
It can be seen that same code, on same Windows, behaves differently based on XP theming.
I we do a check mark, could the image be done as an overlay with alpha white blending around the checkbox so it's visible regards of the image under it? Perhaps with the checkbox in one of the corner?
There might be a lot of icons that would look strange with that.
Yes, a checkbox overlay might well look not nice depending on the image. That being said, looking strange would be an improvement over the complete lack of state information. In any case, I want to make it clear that I'm highly appreciative of the effort being invested to address this issue.
Just to reference another Eclipse feature impacted by this: Window Working Sets. (You may need to edit the Perspective to add this action group - then a button for it appears in the main toolbar.) It's particularly hard to use the "Java Main/Test Sets" actions, because these only show up in the drop-down menu but not the alternative dialog view. Once one has been clicked, it can be hard to understand the resulting behaviour. (For example, I run global file Searches based on my Window Working Set.)
Activity
Don't use an mage in Search menu items on Windows 11
Don't use an image in Search menu items on Windows 11
Don't use an image in Search menu items on Windows 11
SyntevoAlex commentedon Dec 24, 2022
SyntevoAlex commentedon Dec 24, 2022
The screenshot above shows a difference between
SWT.CHECKmenu with.setImage()SWT.CHECKmenuIt seems that on Win11, theme decided to no longer paint blue square around the icon, hence the difference. I would say that the other problem here is that the image is always painted, whether checked or not.
Phillipus commentedon Dec 24, 2022
Isn't that the expected behaviour?
SyntevoAlex commentedon Dec 24, 2022
Looking at the default check mark (in regular
SWT.CHECKmenu without.setImage()) I would say that check image shall only appear when item is checked.SyntevoAlex commentedon Dec 24, 2022
Studied the code more. It turns out that check and image are independent things. SWT even tries to manipulate
MNS_CHECKORBMPstyle in attempt to save space when menu only has images and no checks.However, since XP theming, Windows seems to ignore that; it always paints check and image at the same spot.
Here's a screenshot of a native snippet on Win7, using

disable visual themescompatibility flag. On the left, flag is enabled (that is, XP theming disabled). On the right, flag is disabled (that is, XP theming enabled). The "up arrow" image is just a random image I grabbed.It can be seen that same code, on same Windows, behaves differently based on XP theming.
SyntevoAlex commentedon Dec 24, 2022
For comparison, same native snippet on Win11. It can be seen that checked image item looks the same as non-checked image item. Just like in SWT.
SyntevoAlex commentedon Dec 24, 2022
Conclusions: Windows theming issue, not an SWT bug.
Phillipus commentedon Jan 15, 2023
If so, should we close this?
SyntevoAlex commentedon Jan 15, 2023
Probably.
Phillipus commentedon Jan 15, 2023
Closing...
BeckerWdf commentedon Jun 21, 2023
What does that mean? You mean it's a bug of Windows?
77 remaining items
BeckerWdf commentedon Oct 14, 2024
I agree.
BeckerWdf commentedon Oct 14, 2024
There might be a lot of icons that would look strange with that.
merks commentedon Oct 14, 2024
Yes, a checkbox overlay might well look not nice depending on the image. That being said, looking strange would be an improvement over the complete lack of state information. In any case, I want to make it clear that I'm highly appreciative of the effort being invested to address this issue.
BeckerWdf commentedon Oct 14, 2024
Sure. Same here...
wahlbrink commentedon Oct 14, 2024
(E) Overlay Checkmark
When mixing with menu items without image:
(B)

(E)

tmssngr commentedon Oct 14, 2024
I ask again: how other (native) applications handle this situation on Windows 11?
Update: that's how they look in paint.net:

or LibreOffice (I don't have more native applications):

wahlbrink commentedon Oct 14, 2024
Windows Explorer:

lukeu commentedon Nov 7, 2024
Just to reference another Eclipse feature impacted by this: Window Working Sets. (You may need to edit the Perspective to add this action group - then a button for it appears in the main toolbar.) It's particularly hard to use the "Java Main/Test Sets" actions, because these only show up in the drop-down menu but not the alternative dialog view. Once one has been clicked, it can be hard to understand the resulting behaviour. (For example, I run global file Searches based on my Window Working Set.)
Great to see this is being worked on already!
[win32] Add workaround for missing selection indicator for menu item
[win32] Add workaround for missing selection indicator for menu item
[win32] Add workaround for missing selection indicator for menu item
[win32] Add workaround for missing selection indicator for menu item
[win32] Add workaround for missing selection indicator for menu item
HeikoKlare commentedon Feb 14, 2026
Has been fixed via: