IDEA-192353 Table (list) selected items are shifted to the right

This commit is contained in:
Kirill Kirichenko
2018-05-30 14:12:03 +03:00
parent 0aba0f05e0
commit 4ac277af2d
@@ -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));
}
}