Restrict toolbar width (occupying all the free area otherwise)

This commit is contained in:
Rustam Vishnyakov
2019-03-21 21:25:40 +03:00
parent eb838b38f8
commit 2d637c82ca
@@ -148,6 +148,8 @@ public abstract class AbstractSchemesPanel<T extends Scheme, InfoComponent exten
toolbar.setReservePlaceAutoPopupIcon(false);
toolbar.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY);
JComponent toolbarComponent = toolbar.getComponent();
Dimension maxSize = toolbarComponent.getMaximumSize();
toolbarComponent.setMaximumSize(JBUI.size(22, maxSize.height));
toolbarComponent.setBorder(JBUI.Borders.empty(3));
return toolbarComponent;
}