diff --git a/platform/platform-api/src/com/intellij/ui/TitledSeparator.java b/platform/platform-api/src/com/intellij/ui/TitledSeparator.java
index 1bf3b9e43bc7..13313eb51924 100644
--- a/platform/platform-api/src/com/intellij/ui/TitledSeparator.java
+++ b/platform/platform-api/src/com/intellij/ui/TitledSeparator.java
@@ -21,6 +21,9 @@ public class TitledSeparator extends JPanel {
public static final int SEPARATOR_LEFT_INSET = 6;
public static final int SEPARATOR_RIGHT_INSET = 3;
+ private static final Color ENABLED_SEPARATOR_FOREGROUND = JBColor.namedColor("Group.separatorColor", new JBColor(Gray.xCD, Gray.x51));
+ private static final Color DISABLED_SEPARATOR_FOREGROUND = JBColor.namedColor("Group.disabledSeparatorColor", ENABLED_SEPARATOR_FOREGROUND);
+
@NotNull
public static Border createEmptyBorder() {
return JBUI.Borders.empty(TOP_INSET, 0, BOTTOM_INSET, 0);
@@ -44,7 +47,7 @@ public class TitledSeparator extends JPanel {
}
public TitledSeparator(String text, @Nullable JComponent labelFor) {
- mySeparator.setForeground(JBColor.namedColor("Group.separatorColor", new JBColor(Gray.xCD, Gray.x51)));
+ mySeparator.setForeground(ENABLED_SEPARATOR_FOREGROUND);
setLayout(new GridBagLayout());
add(myLabel, new GridBagConstraints(0, 0, 1, 1, 0, 1, GridBagConstraints.WEST, GridBagConstraints.NONE, JBUI.emptyInsets(), 0, 0));
@@ -95,5 +98,7 @@ public class TitledSeparator extends JPanel {
super.setEnabled(enabled);
myLabel.setEnabled(enabled);
mySeparator.setEnabled(enabled);
+
+ mySeparator.setForeground(enabled ? ENABLED_SEPARATOR_FOREGROUND : DISABLED_SEPARATOR_FOREGROUND);
}
}
diff --git a/plugins/copyright/src/com/maddyhome/idea/copyright/ui/TemplateCommentPanel.form b/plugins/copyright/src/com/maddyhome/idea/copyright/ui/TemplateCommentPanel.form
index 570a44046f24..faf96bf57b53 100644
--- a/plugins/copyright/src/com/maddyhome/idea/copyright/ui/TemplateCommentPanel.form
+++ b/plugins/copyright/src/com/maddyhome/idea/copyright/ui/TemplateCommentPanel.form
@@ -3,7 +3,7 @@
-
+
@@ -210,7 +210,7 @@
-
+
diff --git a/plugins/copyright/src/com/maddyhome/idea/copyright/ui/TemplateCommentPanel.java b/plugins/copyright/src/com/maddyhome/idea/copyright/ui/TemplateCommentPanel.java
index 1236c597c6d7..92b2f9dcaade 100644
--- a/plugins/copyright/src/com/maddyhome/idea/copyright/ui/TemplateCommentPanel.java
+++ b/plugins/copyright/src/com/maddyhome/idea/copyright/ui/TemplateCommentPanel.java
@@ -66,6 +66,7 @@ public class TemplateCommentPanel implements SearchableConfigurable {
private JLabel lblLengthBefore;
private JLabel lblLengthAfter;
private JLabel mySeparatorCharLabel;
+ private JPanel myRelativeLocationPanel;
private void updateBox() {
@@ -274,6 +275,7 @@ public class TemplateCommentPanel implements SearchableConfigurable {
case LanguageOptions.NO_COPYRIGHT:
enableFormattingOptions(false);
showPreview(getOptions());
+ myRelativeLocationPanel.setEnabled(false);
rbBefore.setEnabled(false);
rbAfter.setEnabled(false);
cbAddBlank.setEnabled(false);
@@ -287,6 +289,7 @@ public class TemplateCommentPanel implements SearchableConfigurable {
final boolean isTemplate = parentPanel == null;
enableFormattingOptions(isTemplate);
showPreview(parentOpts != null ? parentOpts : getOptions());
+ myRelativeLocationPanel.setEnabled(isTemplate);
rbBefore.setEnabled(isTemplate);
rbAfter.setEnabled(isTemplate);
cbAddBlank.setEnabled(isTemplate);
@@ -299,6 +302,7 @@ public class TemplateCommentPanel implements SearchableConfigurable {
case LanguageOptions.USE_TEXT:
enableFormattingOptions(true);
showPreview(getOptions());
+ myRelativeLocationPanel.setEnabled(true);
rbBefore.setEnabled(true);
rbAfter.setEnabled(true);
cbAddBlank.setEnabled(true);
@@ -313,6 +317,8 @@ public class TemplateCommentPanel implements SearchableConfigurable {
private void enableFormattingOptions(boolean enable) {
if (enable) {
+ myCommentTypePanel.setEnabled(true);
+ myBorderPanel.setEnabled(true);
rbBlockComment.setEnabled(true);
rbLineComment.setEnabled(true);
cbPrefixLines.setEnabled(allowBlock);