public static @NotNull Dimension patchPreferredSize(Component c, Dimension preferredSize) {
    if (ExperimentalUI.isNewUI() && !IdeaPopupMenuUI.isMenuBarItem(c)) {
      JBInsets outerInsets = IdeaPopupMenuUI.isPartOfPopupMenu(c)
                             ? JBUI.CurrentTheme.PopupMenu.Selection.outerInsets()
                             : JBUI.CurrentTheme.Menu.Selection.outerInsets();
      return new Dimension(preferredSize.width, JBUI.CurrentTheme.List.rowHeight() + outerInsets.height());
    }

    return preferredSize;
  }
public static @NotNull Dimension patchPreferredSize(Component c, Dimension preferredSize)