Insets (Component c) { JBInsets result; if (isComboPopup(c)) { result = JBInsets.create(1, 2); } else if (IdeaPopupMenuUI.isUnderPopup(c)) { result = JBUI.insets("PopupMenu.borderInsets", DEFAULT_INSETS); } else { result = JBUI.insets("Menu.borderInsets", ExperimentalUI.isNewUI() ? JBUI.insets(6, 1) : DEFAULT_INSETS); } return result.asUIResource(); }