mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
+ file colors IDEA-90111
This commit is contained in:
@@ -959,12 +959,15 @@ public class Switcher extends AnAction implements DumbAware {
|
||||
setIcon(IconUtil.getIcon(virtualFile, Iconable.ICON_FLAG_READ_STATUS, myProject));
|
||||
|
||||
FileStatus fileStatus = FileStatusManager.getInstance(myProject).getStatus(virtualFile);
|
||||
final boolean open = FileEditorManager.getInstance(myProject).isFileOpen(virtualFile);
|
||||
TextAttributes attributes = new TextAttributes(fileStatus.getColor(), null , null, EffectType.LINE_UNDERSCORE,
|
||||
Font.PLAIN);
|
||||
open ? Font.PLAIN : Font.ITALIC);
|
||||
append(name, SimpleTextAttributes.fromTextAttributes(attributes));
|
||||
|
||||
if (!selected && myPinned && FileEditorManager.getInstance(myProject).isFileOpen(virtualFile)) {
|
||||
setBackground(UIUtil.isUnderDarcula() ? list.getBackground().brighter() : LightColors.SLIGHTLY_GREEN);
|
||||
final Color color = FileColorManager.getInstance(myProject).getFileColor(virtualFile);
|
||||
|
||||
if (!selected && color != null) {
|
||||
setBackground(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user