diff --git a/platform/platform-impl/src/com/intellij/ide/dnd/Highlighters.java b/platform/platform-impl/src/com/intellij/ide/dnd/Highlighters.java index 100bc9999a9f..991de7ec2c16 100644 --- a/platform/platform-impl/src/com/intellij/ide/dnd/Highlighters.java +++ b/platform/platform-impl/src/com/intellij/ide/dnd/Highlighters.java @@ -186,12 +186,14 @@ public class Highlighters implements DnDEvent.DropTargetHighlightingType { } } + private static final JBColor HIGHLIGHTER_COLOR = JBColor.namedColor("DragAndDrop.borderColor", JBColor.RED); + private static class FilledRectangleHighlighter extends AbstractComponentHighlighter { FilledRectangleHighlighter() { super(); setOpaque(true); - setBorder(BorderFactory.createLineBorder(JBColor.RED)); - setBackground(JBColor.RED); + setBorder(BorderFactory.createLineBorder(HIGHLIGHTER_COLOR)); + setBackground(HIGHLIGHTER_COLOR); } @Override @@ -209,7 +211,7 @@ public class Highlighters implements DnDEvent.DropTargetHighlightingType { RectangleHighlighter() { super(); setOpaque(false); - setBorder(BorderFactory.createLineBorder(JBColor.RED)); + setBorder(BorderFactory.createLineBorder(HIGHLIGHTER_COLOR)); } @Override diff --git a/platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json b/platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json index f290cabf7b04..14dcea57c3a2 100644 --- a/platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json +++ b/platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json @@ -1204,6 +1204,11 @@ "key": "StateWidget.activeBackground", "description": "Background of the state widget when at least one of the registered processes is active", "since": "2021.1" + }, + { + "key": "DragAndDrop.borderColor", + "description": "Drop position highlighting (line/rectangle) for drag-n-drop in trees and lists", + "since": "2021.2" } ] } \ No newline at end of file