From d3587946b080eddd2e7709a165c9cd06e19a66a7 Mon Sep 17 00:00:00 2001 From: Anton Bragin Date: Tue, 27 Aug 2019 17:43:30 +0300 Subject: [PATCH] IDEA-CR-51945: PY-37694 Use grayscale antialiasing in Jupyter and reStructuredText previews, set it as a default GitOrigin-RevId: fe2d0afeddeabdcf96b465109c22af6ebcd582e0 --- .../src/com/intellij/ui/javafx/JavaFxHtmlPanel.java | 2 ++ .../rest/src/com/jetbrains/rest/editor/RestJavaFxHtmlPanel.java | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/ui/javafx/JavaFxHtmlPanel.java b/platform/platform-impl/src/com/intellij/ui/javafx/JavaFxHtmlPanel.java index 308b3390a34d..473f2ab5d785 100644 --- a/platform/platform-impl/src/com/intellij/ui/javafx/JavaFxHtmlPanel.java +++ b/platform/platform-impl/src/com/intellij/ui/javafx/JavaFxHtmlPanel.java @@ -18,6 +18,7 @@ import javafx.application.Platform; import javafx.concurrent.Worker; import javafx.embed.swing.JFXPanel; import javafx.scene.Scene; +import javafx.scene.text.FontSmoothingType; import javafx.scene.web.WebEngine; import javafx.scene.web.WebView; import org.jetbrains.annotations.NotNull; @@ -53,6 +54,7 @@ public class JavaFxHtmlPanel implements Disposable { myWebView = new WebView(); myWebView.setContextMenuEnabled(false); myWebView.setZoom(JBUIScale.scale(1.f)); + myWebView.fontSmoothingTypeProperty().setValue(FontSmoothingType.GRAY); final WebEngine engine = myWebView.getEngine(); registerListeners(engine); diff --git a/python/rest/src/com/jetbrains/rest/editor/RestJavaFxHtmlPanel.java b/python/rest/src/com/jetbrains/rest/editor/RestJavaFxHtmlPanel.java index 4874a07128e8..221adb90b2be 100644 --- a/python/rest/src/com/jetbrains/rest/editor/RestJavaFxHtmlPanel.java +++ b/python/rest/src/com/jetbrains/rest/editor/RestJavaFxHtmlPanel.java @@ -28,7 +28,6 @@ public class RestJavaFxHtmlPanel extends JavaFxHtmlPanel implements RestPreviewP runInPlatformWhenAvailable(() -> { final WebView webView = getWebViewGuaranteed(); - webView.fontSmoothingTypeProperty().setValue(FontSmoothingType.LCD); webView.getEngine().getLoadWorker().stateProperty().addListener(new HyperlinkRedirectListener(webView));