From 7a8e84e78cd93efe9aa0cad6c565fb1ad45a0d1c Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Tue, 8 Nov 2016 20:27:51 +0300 Subject: [PATCH] [vcs]: NewEditChangelistPanel cosmetic fixes * IDEA-107357, IDEA-86333; --- .../platform-resources-en/src/messages/VcsBundle.properties | 2 +- .../openapi/vcs/changes/ui/NewEditChangelistPanel.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/platform-resources-en/src/messages/VcsBundle.properties b/platform/platform-resources-en/src/messages/VcsBundle.properties index a5a7fb61dbe5..486ac584b984 100644 --- a/platform/platform-resources-en/src/messages/VcsBundle.properties +++ b/platform/platform-resources-en/src/messages/VcsBundle.properties @@ -385,7 +385,7 @@ browse.changes.title=Browse Changes browse.changes.show.all.button=Show All Changes browse.changes.show.recent.button=Show Recent Changes diff.unknown.path.title=Unknown diff -new.changelist.make.active.checkbox=Make this changelist &active +new.changelist.make.active.checkbox=Set &active composite.change.provider.include.vcs.checkbox=Include changes from {0} shelf.tab=Shelf directory.mapping.remove.title=Edit VCS Directory Mapping diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/NewEditChangelistPanel.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/NewEditChangelistPanel.java index 022076e1edf5..7ad628f7f580 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/NewEditChangelistPanel.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/NewEditChangelistPanel.java @@ -33,6 +33,7 @@ import com.intellij.util.ui.JBUI; import org.jetbrains.annotations.NotNull; import javax.swing.*; +import javax.swing.border.CompoundBorder; import java.awt.*; import java.util.Set; @@ -75,10 +76,12 @@ public abstract class NewEditChangelistPanel extends JPanel { gb.weightx = 1; gb.weighty = 1; gb.fill = GridBagConstraints.BOTH; + gb.insets = JBUI.insetsTop(2); myDescriptionTextArea = createEditorField(project, 4); myDescriptionTextArea.setOneLineMode(false); add(myDescriptionTextArea, gb); commentLabel.setLabelFor(myDescriptionTextArea); + gb.insets = JBUI.insetsTop(0); ++ gb.gridy; gb.gridx = 0; @@ -88,6 +91,7 @@ public abstract class NewEditChangelistPanel extends JPanel { final BoxLayout layout = new BoxLayout(myAdditionalControlsPanel, BoxLayout.X_AXIS); myAdditionalControlsPanel.setLayout(layout); myMakeActiveCheckBox = new JCheckBox(VcsBundle.message("new.changelist.make.active.checkbox")); + myMakeActiveCheckBox.setBorder(JBUI.Borders.emptyRight(4)); myAdditionalControlsPanel.add(myMakeActiveCheckBox); add(myAdditionalControlsPanel, gb); } @@ -187,6 +191,8 @@ public abstract class NewEditChangelistPanel extends JPanel { editorField = service.getEditorField(FileTypes.PLAIN_TEXT.getLanguage(), project, editorFeatures); final int height = editorField.getFontMetrics(editorField.getFont()).getHeight(); editorField.getComponent().setMinimumSize(new Dimension(100, (int)(height * scaleFactor))); + editorField.addSettingsProvider(editor -> editor.getContentComponent() + .setBorder(new CompoundBorder(editor.getContentComponent().getBorder(), JBUI.Borders.emptyLeft(2)))); return editorField; }