Improve JMenuItem layout in Windows L&F

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • None
    • Affects Version/s: 25, 26
    • Component/s: client-libs
    • b11
    • 26
    • windows

      JDK-8348760 added a new column to display a selection mark and icon separately to the menu layout in Windows Look-and-Feel, but the width of the menu wasn't changed. Therefore, there are more things to display in the same amount of space.

      The Swing menu layout doesn't match the margins that we see in Windows File Explorer [1]. "The margin between the check mark / bullet and the icon should be larger."

      If one compares screenshots [2] of menus from File Explorer and Swing, "there's so much 'air' in File Explorer version of the popup menu." [3]

      The latest issue found in menu rendering was JDK-8374506 where the arrow to indicate submenu was painted over long text. In the code review for JDK-8374506, I raised my concern with the menu layout again [4], and Alex Zuev [~kizune] agreed with me [5].

      [1] https://github.com/openjdk/jdk/pull/23324#discussion_r2185359330
      [2] https://github.com/openjdk/jdk/pull/23324#issuecomment-2705406453
      [3] https://github.com/openjdk/jdk/pull/23324#discussion_r2185371866
      [4] https://github.com/openjdk/jdk/pull/29375#pullrequestreview-3713721845
      [5] https://github.com/openjdk/jdk/pull/29375#issuecomment-3818883539

            Assignee:
            Unassigned
            Reporter:
            Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: