mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-97406 switch on scalable effects by default
It also fixes an issue with Retina on Mac (see JBHiDPIScaledImage)
This commit is contained in:
@@ -265,9 +265,7 @@ public enum EffectPainter implements RegionPainter<Paint> {
|
||||
Long key = color.getRGB() ^ ((long)height << 32);
|
||||
BufferedImage image = myCache.get(key);
|
||||
if (image == null || UIUtil.isRetina(g) != (image instanceof JBHiDPIScaledImage)) {
|
||||
int period = getPeriod(height);
|
||||
image = UIUtil.createImageForGraphics(g, period << 8, height, BufferedImage.TYPE_INT_ARGB);
|
||||
paintImage(image.createGraphics(), color, image.getWidth(), image.getHeight(), period);
|
||||
image = createImage(g, color, height);
|
||||
myCache.put(key, image);
|
||||
}
|
||||
return image;
|
||||
@@ -275,8 +273,9 @@ public enum EffectPainter implements RegionPainter<Paint> {
|
||||
|
||||
BufferedImage createImage(Graphics2D g, Paint paint, int height) {
|
||||
int period = getPeriod(height);
|
||||
BufferedImage image = UIUtil.createImageForGraphics(g, period << 1, height, BufferedImage.TYPE_INT_ARGB);
|
||||
paintImage(image.createGraphics(), paint, image.getWidth(), image.getHeight(), period);
|
||||
int width = period << (paint instanceof Color ? 8 : 1);
|
||||
BufferedImage image = UIUtil.createImageForGraphics(g, width, height, BufferedImage.TYPE_INT_ARGB);
|
||||
paintImage(image.createGraphics(), paint, width, height, period);
|
||||
return image;
|
||||
}
|
||||
|
||||
|
||||
@@ -780,9 +780,9 @@ cidr.xcode.derived.data.override.description=Ignore Xcode DerivedData location s
|
||||
editor.rainbow.identifiers=false
|
||||
editor.rainbow.identifiers.description=Rainbow identifiers in editor
|
||||
|
||||
ide.text.effect.new=false
|
||||
ide.text.effect.new=true
|
||||
ide.text.effect.new.description=Enables new effect painter for text
|
||||
ide.text.effect.new.scale=false
|
||||
ide.text.effect.new.scale=true
|
||||
ide.text.effect.new.scale.description=Enables scalable effect painter for text
|
||||
|
||||
ide.intellij.laf.win10.ui=false
|
||||
|
||||
Reference in New Issue
Block a user