diff options
author | Saif Abdul Cassim <saif.15@cse.mrt.ac.lk> | 2020-08-29 16:48:53 +0200 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2020-08-29 16:48:53 +0200 |
commit | 869bc35e08b034b33954a77d635825d9e686b7a4 (patch) | |
tree | 9b1799b60e035c054175ff4f5c442fd526e551c0 | |
parent | 14bc6918349dafadeb92e39792c70796dca7fbde (diff) |
Remove usage of the apple.awt package (not in Debian)
Forwarded: not-needed
Gbp-Pq: Name remove-apple-awt-api.patch
-rw-r--r-- | platform/util/src/com/intellij/util/AppleHiDPIScaledImage.java | 10 | ||||
-rw-r--r-- | platform/util/src/com/intellij/util/ui/IsRetina.java | 16 |
2 files changed, 3 insertions, 23 deletions
diff --git a/platform/util/src/com/intellij/util/AppleHiDPIScaledImage.java b/platform/util/src/com/intellij/util/AppleHiDPIScaledImage.java index c028cb09..d414318c 100644 --- a/platform/util/src/com/intellij/util/AppleHiDPIScaledImage.java +++ b/platform/util/src/com/intellij/util/AppleHiDPIScaledImage.java @@ -1,8 +1,6 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.util; -import apple.awt.CImage; - import java.awt.*; import java.awt.image.BufferedImage; @@ -10,14 +8,10 @@ import java.awt.image.BufferedImage; @Deprecated public class AppleHiDPIScaledImage { public static BufferedImage create(int width, int height, int imageType) { - return new CImage.HiDPIScaledImage(width, height, imageType) { - @Override - protected void drawIntoImage(BufferedImage image, float scale) { - } - }; + return new BufferedImage(width, height, imageType); } public static boolean is(Image image) { - return image instanceof CImage.HiDPIScaledImage; + return false; } } diff --git a/platform/util/src/com/intellij/util/ui/IsRetina.java b/platform/util/src/com/intellij/util/ui/IsRetina.java index ec7d80a5..e0f40c78 100644 --- a/platform/util/src/com/intellij/util/ui/IsRetina.java +++ b/platform/util/src/com/intellij/util/ui/IsRetina.java @@ -15,25 +15,11 @@ */ package com.intellij.util.ui; -import apple.awt.CImage; import java.awt.image.BufferedImage; class IsRetina { public static boolean isRetina() { - try { - final boolean[] isRetina = new boolean[1]; - new CImage.HiDPIScaledImage(1, 1, BufferedImage.TYPE_INT_ARGB) { - @Override - public void drawIntoImage(BufferedImage image, float v) { - isRetina[0] = v > 1; - } - }; - return isRetina[0]; - } - catch (Throwable e) { - e.printStackTrace(); - return false; - } + return false; } } |