mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-344208 Rename AVOID_OVERRIDING to NO_BACKGROUND_HINT
GitOrigin-RevId: e9e608f9be46b32702553dadb9eaa8a77f49d9f4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
80dae7add1
commit
902cdf406b
+1
-1
@@ -34,7 +34,7 @@ public class DarculaButtonPainter implements Border, UIResource {
|
||||
|
||||
try {
|
||||
Object avoidExtendingObject = ClientProperty.get(c, AVOID_EXTENDING_BORDER_GRAPHICS);
|
||||
g2.setRenderingHint(IdeBackgroundUtil.AVOID_OVERRIDING, avoidExtendingObject != null && avoidExtendingObject.equals(Boolean.TRUE));
|
||||
g2.setRenderingHint(IdeBackgroundUtil.NO_BACKGROUND_HINT, avoidExtendingObject != null && avoidExtendingObject.equals(Boolean.TRUE));
|
||||
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
|
||||
MacUIUtil.USE_QUARTZ ? RenderingHints.VALUE_STROKE_PURE : RenderingHints.VALUE_STROKE_NORMALIZE);
|
||||
|
||||
@@ -193,7 +193,7 @@ public final class IdeBackgroundUtil {
|
||||
};
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static final RenderingHints.Key AVOID_OVERRIDING = new RenderingHints.Key(2) {
|
||||
public static final RenderingHints.Key NO_BACKGROUND_HINT = new RenderingHints.Key(2) {
|
||||
@Override
|
||||
public boolean isCompatibleValue(Object val) {
|
||||
return val instanceof Boolean;
|
||||
@@ -226,8 +226,8 @@ public final class IdeBackgroundUtil {
|
||||
return new MyGraphics(getDelegate().create(), helper, offsets, preserved);
|
||||
}
|
||||
|
||||
private Boolean shouldAvoidOverriding() {
|
||||
Object obj = getRenderingHint(AVOID_OVERRIDING);
|
||||
private Boolean isNoBackground() {
|
||||
Object obj = getRenderingHint(NO_BACKGROUND_HINT);
|
||||
return obj != null && Boolean.TRUE.equals(obj);
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ public final class IdeBackgroundUtil {
|
||||
}
|
||||
|
||||
void runAllPainters(int x, int y, int width, int height, @Nullable Shape sourceShape, @Nullable Object reason) {
|
||||
if (width <= 1 || height <= 1 || shouldAvoidOverriding()) return;
|
||||
if (width <= 1 || height <= 1 || isNoBackground()) return;
|
||||
boolean hasAlpha;
|
||||
if (reason instanceof Color) {
|
||||
hasAlpha = ((Color)reason).getAlpha() < 255;
|
||||
|
||||
Reference in New Issue
Block a user