From 5c8abedbb40c626de028c841d29162f4afcd5b4b Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Sun, 7 Feb 2016 23:19:08 +0300 Subject: [PATCH] [vcs-log] fix selected unfocused background --- .../openapi/vcs/changes/ui/VirtualFileListCellRenderer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileListCellRenderer.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileListCellRenderer.java index 6f146ae7c556..568ae4c281eb 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileListCellRenderer.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/VirtualFileListCellRenderer.java @@ -24,6 +24,7 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; import com.intellij.util.PlatformIcons; +import com.intellij.util.ui.UIUtil; import javax.swing.*; import java.io.File; @@ -53,6 +54,9 @@ public class VirtualFileListCellRenderer extends ColoredListCellRenderer { final FileStatus fileStatus = myIgnoreFileStatus ? FileStatus.NOT_CHANGED : getStatus(value, path); append(getName(path), new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, fileStatus.getColor(), null)); putParentPath(value, path, path); + setBackground(selected + ? (hasFocus ? UIUtil.getListSelectionBackground() : UIUtil.getListUnfocusedSelectionBackground()) + : UIUtil.getListBackground()); } protected String getName(FilePath path) {