From 4ac277af2d083bbf9334e0ae6c0a67777207ca09 Mon Sep 17 00:00:00 2001 From: Kirill Kirichenko Date: Wed, 30 May 2018 13:50:33 +0300 Subject: [PATCH] IDEA-192353 Table (list) selected items are shifted to the right --- .../platform-api/src/com/intellij/ui/TableCellState.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/ui/TableCellState.java b/platform/platform-api/src/com/intellij/ui/TableCellState.java index d46082320d4f..f7ee2a8af931 100644 --- a/platform/platform-api/src/com/intellij/ui/TableCellState.java +++ b/platform/platform-api/src/com/intellij/ui/TableCellState.java @@ -15,6 +15,7 @@ */ package com.intellij.ui; +import com.intellij.util.ui.JBEmptyBorder; import com.intellij.util.ui.UIUtil; import javax.swing.*; @@ -40,12 +41,16 @@ public class TableCellState { myForeground = table.getForeground(); myBackground = table.getBackground(); } + + Border border = UIUtil.getTableFocusCellHighlightBorder(); if (hasFocus) { - myCellBorder = UIUtil.getTableFocusCellHighlightBorder(); + myCellBorder = border; if (table.isCellEditable(row, column)) { myForeground = UIUtil.getTableFocusCellForeground(); myBackground = UIUtil.getTableFocusCellBackground(); } + } else { + myCellBorder = new JBEmptyBorder(border.getBorderInsets(null)); } }