Skip to content

Commit 4c2749f

Browse files
Merge pull request #9209 from neilcsmith-net/tc-drag-colour
Follow FlatLaf colours for component drag target indicator.
2 parents 3b75460 + f4f0560 commit 4c2749f

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

platform/core.windows/src/org/netbeans/core/windows/view/dnd/DropTargetGlassPane.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ private TexturePaint getIndicationPaint() {
292292
private Stroke stroke;
293293
private Stroke getIndicationStroke() {
294294
if (stroke == null) {
295-
stroke = new BasicStroke(3, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f, new float[] {10.0f}, 0.0f);
295+
int strokeWidth = UIManager.getInt("Panel.dropTargetGlassPane.strokeWidth");
296+
strokeWidth = strokeWidth < 1 ? 3 : strokeWidth;
297+
stroke = new BasicStroke(strokeWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f, new float[] {10.0f}, 0.0f);
296298
}
297299
return stroke;
298300
}

platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatDarkLaf.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ ViewTab.underlineColor=$EditorTab.underlineColor
7272
ViewTab.inactiveUnderlineColor=$EditorTab.inactiveUnderlineColor
7373
ViewTab.tabSeparatorColor=$EditorTab.tabSeparatorColor
7474

75+
#---- Tab Dragging ----
76+
77+
Panel.dropTargetGlassPane=tint($EditorTab.underlineColor, 25%)
78+
7579
#---- SlidingButton ----
7680

7781
SlidingButton.hoverBackground=$ViewTab.hoverBackground

platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ ViewTab.tabSeparatorColor=$Component.borderColor
9494
ViewTab.showTabSeparators=true
9595
ViewTab.showSelectedTabBorder=true
9696

97+
#---- Tab Dragging ----
98+
99+
Panel.dropTargetGlassPane=$EditorTab.underlineColor
100+
Panel.dropTargetGlassPane.strokeWidth=3
101+
97102
#---- Multi-tabs ----
98103

99104
nb.multitabs.tabInsets=5,2,7,2

platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLightLaf.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ EditorTab.attentionForeground=#000
3939
EditorTab.underlineColor=$TabbedPane.underlineColor
4040
EditorTab.inactiveUnderlineColor=#00000000
4141

42-
4342
#---- ViewTab ----
4443

4544
ViewTab.background=$EditorTab.background
@@ -56,6 +55,9 @@ ViewTab.attentionForeground=$EditorTab.attentionForeground
5655
ViewTab.underlineColor=$EditorTab.underlineColor
5756
ViewTab.inactiveUnderlineColor=$EditorTab.inactiveUnderlineColor
5857

58+
#---- Tab Dragging ----
59+
60+
Panel.dropTargetGlassPane=shade($EditorTab.underlineColor, 20%)
5961

6062
#---- SlidingButton ----
6163

0 commit comments

Comments
 (0)