correct fonts in Ctrl-N-like dialogs

This commit is contained in:
Anna Kozlova
2005-03-11 23:03:11 +03:00
parent 07f85457d5
commit 5a96db4052
2 changed files with 5 additions and 1 deletions
@@ -36,6 +36,8 @@ import com.intellij.ide.ui.UISettings;
import com.intellij.ide.util.treeView.NodeRenderer;
import com.intellij.navigation.ItemPresentation;
import com.intellij.navigation.NavigationItem;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.vcs.FileStatus;
import com.intellij.ui.ColoredListCellRenderer;
@@ -56,6 +58,9 @@ public class NavigationItemListCellRenderer extends JPanel implements ListCellRe
int index,
boolean isSelected,
boolean cellHasFocus) {
EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
Font editorFont = new Font(scheme.getEditorFontName(), Font.PLAIN, scheme.getEditorFontSize());
setFont(editorFont);
removeAll();
final Component leftCellRendererComponent =
new LeftRenderer().getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
@@ -85,7 +85,6 @@ public class PsiElementModuleRenderer extends DefaultListCellRenderer{
setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 2));
setHorizontalTextPosition(SwingConstants.LEFT);
setBackground(UIManager.getColor(selected ? "List.selectionBackground" : "List.background"));
setFont(UIManager.getFont("List.font"));
setForeground(selected ? UIManager.getColor("List.selectionForeground") : UIManager.getColor("textInactiveText"));
}
}