IJPL-215192 Islands: Profiler / Coverage tool windows have wrong background for UI components if 'Different tool window background' is on

(cherry picked from commit 7988fe148e265afbd3714e35bfba31d677744b26)

IJ-CR-182808

GitOrigin-RevId: 430684560d0f433533169eef0e3f55bd5dd96734
This commit is contained in:
Alexander Lobas
2025-11-10 09:44:10 +01:00
committed by intellij-monorepo-bot
parent 93c92850ba
commit 4a0e3c26de
3 changed files with 4 additions and 3 deletions

View File

@@ -307,7 +307,7 @@ public class JBTreeTable extends JComponent implements TreePathBackgroundSupplie
return super.getWidth() + 1;
}
};
myTreeTableHeader.setTable(ref); // <- we steal table header and need to provide any JTable to handle right ui painting
ref.setTableHeader(myTreeTableHeader); // <- we steal table header and need to provide any JTable to handle right ui painting
myTreeTableHeader.setColumnModel(new TreeColumnModel());
myTreeTableHeader.setReorderingAllowed(false);
myTreeTableHeader.setResizingAllowed(false);

View File

@@ -175,6 +175,7 @@ abstract class ChartWrapper : ChartComponent {
open val component: JComponent by lazy {
createCentralPanel().apply {
background = this@ChartWrapper.background
with(MouseAware()) {
addMouseMotionListener(this)
addMouseListener(this)
@@ -217,7 +218,7 @@ abstract class ChartWrapper : ChartComponent {
private inner class CentralPanel : JComponent() {
override fun paintComponent(g: Graphics) {
(g as Graphics2D).clip(Rectangle(0, 0, width, height))
g.color = this@ChartWrapper.background
g.color = background
(g as Graphics2D).fill(g.clip)
this@ChartWrapper.height = height
this@ChartWrapper.width = width

View File

@@ -113,7 +113,7 @@ public class CoverageView extends BorderLayoutPanel implements UiDataProvider, D
int row,
int column) {
final Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
setBackground(UIUtil.getTableBackground(isSelected, myTable.hasFocus()));
setBackground(isSelected ? UIUtil.getTableBackground(isSelected, myTable.hasFocus()) : null);
return component;
}
});