Skip to content

Menubar not showing when using CustomMenuItem #18

@vewert

Description

@vewert

When running my application on macOS, I noticed the Application menubar was not showing any more, and I saw the following in the console:
Warning: MenuBar ignored property useSystemMenuBar because menus contain CustomMenuItem

I recently added a submenu that uses CustomMenuItem. When I removed that, the menubar worked again.

I did some digging, and it looks like the warning message comes from the MenuBarSkin class:

private boolean menusContainCustomMenuItem() {
  for (Menu menu : getSkinnable().getMenus()) {
    if (menuContainsCustomMenuItem(menu)) {
      System.err.println("Warning: MenuBar ignored property useSystemMenuBar because menus contain CustomMenuItem");
      return true;
    }
  }
  return false;
}

On Windows (where I am not using NSMenuFX), using CustomMenuItem works fine. Is there some reason why CustomMenuItem doesn't work with NSMenuFX?

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions