Introduce named color DragAndDrop.borderColor to support theming in D-n-D for trees/lists

GitOrigin-RevId: b88ad5b7e02d11f27d196ef35aa5aba99064979d
This commit is contained in:
Vassiliy.Kudryashov
2021-05-10 10:45:25 +00:00
committed by intellij-monorepo-bot
parent dde9bfe0fe
commit 767d50db1d
2 changed files with 10 additions and 3 deletions
@@ -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
@@ -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"
}
]
}