fixes after IDEA-CR-8401
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Fri, 12 Feb 2016 10:01:12 +0000 (13:01 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Fri, 12 Feb 2016 10:01:47 +0000 (13:01 +0300)
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorComponentImpl.java
platform/platform-impl/src/com/intellij/ui/EditorTextField.java

index a6244dc07117202d8aed1614509d3260e9b2d0d0..b8f1c8087650c8c2ffbd1dfe62bcf53baae03e06 100644 (file)
@@ -112,7 +112,7 @@ public class EditorComponentImpl extends JTextComponent implements Scrollable, D
   @Override
   public void paint(@NotNull Graphics g) {
     if (!isEnabled()) {
-      g = new Grayer((Graphics2D)g, EditorColorsManager.getInstance().getGlobalScheme().getDefaultBackground());
+      g = new Grayer((Graphics2D)g, getBackground());
     }
     super.paint(g);
   }
index b20a27e6fddf3e911ad3dc6b8c97ae6dd0bef18d..54cf1e4f2572e255ad22a19dee252534dc04a812 100644 (file)
@@ -479,27 +479,7 @@ public class EditorTextField extends NonOpaquePanel implements DocumentListener,
       editor.setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(myProject, myFileType));
     }
 
-    final EditorColorsScheme colorsScheme = editor.getColorsScheme();
     editor.getSettings().setCaretRowShown(false);
-    if (!isEnabled()) {
-      editor.setColorsScheme(new DelegateColorScheme(colorsScheme) {
-        @Nullable
-        @Override
-        public Color getColor(ColorKey key) {
-          return super.getColor(key);
-        }
-
-        @Override
-        public TextAttributes getAttributes(TextAttributesKey key) {
-          final TextAttributes attributes = super.getAttributes(key);
-          if (!isEnabled()) {
-            return new TextAttributes(UIUtil.getInactiveTextColor(), attributes.getBackgroundColor(), attributes.getEffectColor(), attributes.getEffectType(), attributes.getFontType());
-          }
-
-          return attributes;
-        }
-      });
-    }
 
     editor.setOneLineMode(myOneLineMode);
     editor.getCaretModel().moveToOffset(myDocument.getTextLength());