private void setForeToolbarBorder(@NotNull JComponent component) {
    int left = 0;
    int right = 0;
    Border border = component.getBorder();
    if (border != null) {
      Insets insets = border.getBorderInsets(component);
      left = insets.left;
      right = insets.right;
    }
    UiDecorator.UiDecoration decoration = tabs.getDecoration();
    Insets labelInsets = decoration.getLabelInsets();
    Function<TabLabel.ActionsPosition, Insets> supplier = decoration.getContentInsetsSupplier();
    if (labelInsets != null && supplier != null) {
      int tabLeftInsect = labelInsets.left + supplier.apply(TabLabel.ActionsPosition.RIGHT).left;
      if (tabLeftInsect > right) {
        right = tabLeftInsect;
      }
    }
    component.setBorder(JBUI.Borders.empty(0, left, 0, right));
  }
private void setForeToolbarBorder(@NotNull JComponent component)