diff --git a/platform/platform-api/src/com/intellij/ui/table/JBTable.java b/platform/platform-api/src/com/intellij/ui/table/JBTable.java index b88bc63ad3e9..cc5225b162c0 100644 --- a/platform/platform-api/src/com/intellij/ui/table/JBTable.java +++ b/platform/platform-api/src/com/intellij/ui/table/JBTable.java @@ -738,7 +738,7 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component } } else { - Color hovered = isHoverPaintingDisabled(this) ? null : getHoveredRowBackground(); + Color hovered = isHoverPaintingDisabled(this) || isHoverPaintingDisabled(component) ? null : getHoveredRowBackground(); if (hovered != null) { if (row == TableHoverListener.getHoveredRow(this)) { setRendererBackground(component, hovered); diff --git a/platform/util/ui/src/com/intellij/ui/render/RenderingUtil.java b/platform/util/ui/src/com/intellij/ui/render/RenderingUtil.java index 784ec350ff41..ccdc4e8b7efe 100644 --- a/platform/util/ui/src/com/intellij/ui/render/RenderingUtil.java +++ b/platform/util/ui/src/com/intellij/ui/render/RenderingUtil.java @@ -162,6 +162,10 @@ public final class RenderingUtil { return Boolean.FALSE.equals(component.getClientProperty(PAINT_HOVERED_BACKGROUND)); } + @ApiStatus.Internal + public static void setHoverPaintingDisabled(@NotNull JComponent component, boolean disabled) { + component.putClientProperty(PAINT_HOVERED_BACKGROUND, !disabled); + } public static @Nullable Color getHoverBackground(@NotNull JList list) { if (isHoverPaintingDisabled(list)) return null; return CurrentTheme.List.Hover.background(isFocused(list));