JComponent (@NotNull Disposable parentDisposable) { var horizontalGap = 4; IdeMessagePanel panel = new IdeMessagePanel(null, MessagePool.getInstance()); Disposer.register(parentDisposable, panel); DefaultActionGroup group = new DefaultActionGroup(panel.getAction(), new NotificationEventAction(parentDisposable)); ActionToolbarImpl toolbar = (ActionToolbarImpl)ActionManager.getInstance().createActionToolbar( "WelcomeScreen.NotificationPanel", group, true); toolbar.setMinimumButtonSize(new JBDimension(26, 26)); toolbar.setReservePlaceAutoPopupIcon(false); toolbar.setActionButtonBorder(horizontalGap, 1); JComponent result = toolbar.getComponent(); toolbar.setTargetComponent(result); result.setOpaque(false); if (ExperimentalUI.isNewUI()) { result.setBorder(JBUI.Borders.empty(0, 0, 15, 24 - horizontalGap)); } else { result.setBorder(JBUI.Borders.empty(0, 0, 5, 8)); } return result; }