apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.68k stars 855 forks source link

Windows-Default LAF has strange offset in PopupMenus #5697

Open SeeYouSunday opened 1 year ago

SeeYouSunday commented 1 year ago

Apache NetBeans version

Apache NetBeans 17

What happened

Using the LAF "Windows" causes PopupMenus to have strange x-Offsets for every MenuItem. This seems to happen on every type of menu like the Toolbar-Menu of NetBeans itself but also for every JMenuItem in a JPopupMenu used in a NetBeans Platform Application.

I made a Screenshot in NetBeans highlighting the resulting gab: image

This does not happen on other LAF implementations like Flat LAF.

How to reproduce

  1. Activate LAF "Windows" through Tools --> Options --> Appearance --> Look and Feel --> Prefered Look and Feel
  2. Reboot NetBeans
  3. Open any Toolbar Menus

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 10 (22H2 Build 19045.2364)

JDK

11

Apache NetBeans packaging

Apache NetBeans provided installer, Apache NetBeans binary zip, Apache NetBeans platform

Anything else

No response

Are you willing to submit a pull request?

No

Update I stated, that Windows LAF was the default LAF, but that's not correct.

deinloft-eng commented 1 year ago

Is there any solution for this strange offset (at windows LAF)?

neilcsmith-net commented 1 year ago

Using the Default LAF "Windows"

The default LAF is FlatLaf. Fixes for other LAF are welcome.

deinloft-eng commented 1 year ago

I've meant using the Default configuration has this strange offset...

If I use the "Metal" laf, this is fixed, but it appers other strange "spaces".

And I need to use the same laf as the picture above.

SeeYouSunday commented 1 year ago

The default LAF is FlatLaf. Fixes for other LAF are welcome.

You are correct, sorry for that. Flat LAF (the actual default LAF) does not have this problem. But the LAF "Windows" does.

myroch commented 8 months ago

any workaround for this?