Skip to content

Commit cf1476e

Browse files
committed
Merge remote-tracking branch 'origin/GP-1-dragonmacher-fixed-flatlaf-table-header-hover-painting'
2 parents ac61667 + 4a6b151 commit cf1476e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GTableHeaderRenderer.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,17 @@ public void paint(Graphics g) {
105105

106106
updateClipping();
107107

108+
// Note: we should not have to set the colors here. That is usually done by the renderer
109+
// when getTableCellRendererComponent() is called. Some Lafs, like the FlatLaf will change
110+
// colors when painting, after the renderer component has been configured. To support that,
111+
// we must update the colors here as well.
112+
rendererComponent.setBackground(getBackground());
113+
rendererComponent.setForeground(getForeground());
114+
108115
rendererComponent.paint(g);
109116

110117
// paint our items after the delegate call so that we paint on top
111-
super.paint(g);
118+
paintChildren(g);
112119
}
113120

114121
private void updateClipping() {

0 commit comments

Comments
 (0)