Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6501562

GTK L&F: top-level JMenu sized/rendered differently than native

    XMLWordPrintable

    Details

    • Subcomponent:
    • Understanding:
      Cause Known
    • CPU:
      generic
    • OS:
      generic

      Description

      While investigating 6365799, I noticed that top-level JMenus (meaning JMenus that
      have a JMenuBar as a parent) are rendered differently in Swing's GTK L&F when compared
      to native. I only looked into it briefly, but I think GTK themes/engines may return
      different x/y thickness and "horizontal-padding" values depending on whether the
      menu item is in a menu bar or not. I'm not positive about this, but I do know that
      Swing's top-level JMenus take up less space horizontally than their native equivalent,
      making them look a bit cramped, which is why I suspected a difference in insets
      values here.

      Also, GTK themes/engines may choose to render the menu item differently
      in a menu bar context (e.g. Clearlooks and ubuntulooks/Human seem to
      not round the bottom corners in native apps [see ubuntulooks_style.c, draw_box(),
      "menuitem" case], but in Swing's GTK L&F we get the rounded corners in this case
      because we don't differentiate the two cases).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              peterz Peter Zhelezniakov
              Reporter:
              campbell Christopher Campbell (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Imported:
                Indexed: