mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-102056 Settings->Editor->Colors&Fonts could use splitter between settings and preview
This commit is contained in:
+7
-2
@@ -21,6 +21,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsScheme;
|
||||
import com.intellij.openapi.options.colors.ColorSettingsPage;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.GuiUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -78,8 +79,12 @@ public class NewColorAndFontPanel extends JPanel {
|
||||
|
||||
// We don't want to show non-used preview panel (it's considered to be not in use if it doesn't contain text).
|
||||
if (myPreviewPanel.getPanel() != null && (page == null || !StringUtil.isEmptyOrSpaces(page.getDemoText()))) {
|
||||
add(top, BorderLayout.NORTH);
|
||||
add(myPreviewPanel.getPanel(), BorderLayout.CENTER);
|
||||
@SuppressWarnings("SuspiciousNameCombination")
|
||||
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, top, myPreviewPanel.getPanel());
|
||||
splitPane.setBorder(BorderFactory.createEmptyBorder());
|
||||
splitPane.setContinuousLayout(true);
|
||||
add(splitPane);
|
||||
GuiUtils.replaceJSplitPaneWithIDEASplitter(splitPane);
|
||||
}
|
||||
else {
|
||||
add(top, BorderLayout.CENTER);
|
||||
|
||||
+2
-5
@@ -100,12 +100,9 @@ public class OptionsPanelImpl extends JPanel implements OptionsPanel {
|
||||
});
|
||||
|
||||
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myOptionsTree);
|
||||
scrollPane.setPreferredSize(JBUI.size(230, 60));
|
||||
JPanel north = new JPanel(new BorderLayout());
|
||||
north.add(scrollPane, BorderLayout.CENTER);
|
||||
north.add(myOptionsPanel, BorderLayout.EAST);
|
||||
add(scrollPane, BorderLayout.CENTER);
|
||||
add(myOptionsPanel, BorderLayout.EAST);
|
||||
|
||||
add(north, BorderLayout.NORTH);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user