Hide separator above tabbed code style panel (extra line)

This commit is contained in:
Rustam Vishnyakov
2019-03-19 12:09:09 +03:00
parent 42f03ebc54
commit 3efe535bc2
2 changed files with 9 additions and 2 deletions
@@ -244,6 +244,7 @@ public class CodeStyleMainPanel extends JPanel implements TabbedLanguageCodeStyl
if (currentTab != null) {
tabbedPanel.changeTab(currentTab);
}
mySchemesPanel.setSeparatorVisible(false);
}
mySettingsPanels.put(name, panel);
mySettingsPanel.add(scheme.getName(), panel);
@@ -63,7 +63,8 @@ public abstract class AbstractSchemesPanel<T extends Scheme, InfoComponent exten
private static final Color ERROR_MESSAGE_FOREGROUND = Color.RED;
protected static final int DEFAULT_VGAP = 8;
private JSeparator mySettingsPanelSeparator;
// endregion
AbstractSchemesPanel() {
@@ -93,13 +94,18 @@ public abstract class AbstractSchemesPanel<T extends Scheme, InfoComponent exten
horizontalContainer.add(rightCustomComponent);
add(horizontalContainer);
}
add(new JSeparator());
mySettingsPanelSeparator = new JSeparator();
add(mySettingsPanelSeparator);
if (vGap > 0) {
add(Box.createVerticalGlue());
add(Box.createRigidArea(new JBDimension(0, vGap)));
}
}
public void setSeparatorVisible(boolean visible) {
mySettingsPanelSeparator.setVisible(visible);
}
@NotNull
private static JPanel createVerticalContainer() {
JPanel container = new JPanel();