private void updateComboboxMaximumSize() {
    JComponent combobox = mySchemesCombo.getComponent();
    Dimension preferredSize = combobox.getPreferredSize();

    combobox.setMaximumSize(preferredSize);
    Container container = combobox.getParent();
    if (container != null) {
      container.setMaximumSize(new Dimension(container.getMaximumSize().width,
                                             preferredSize.height));
    }
    myToolbar.setMaximumSize(new Dimension(JBUIScale.scale(22), preferredSize.height));
  }
private void updateComboboxMaximumSize()