修复未正确处理 EnumBackgroundImage.TRANSLUCENT 的问题 (#4195)

This commit is contained in:
Glavo
2025-08-04 20:18:29 +08:00
committed by GitHub
parent a66ddb9a20
commit 77c3ef6ced
2 changed files with 3 additions and 3 deletions

View File

@@ -22,6 +22,6 @@ public enum EnumBackgroundImage {
CUSTOM,
CLASSIC,
NETWORK,
TRANSLUCENT,
TRANSLUCENT, // Deprecated
PAINT
}

View File

@@ -233,8 +233,8 @@ public class DecoratorController {
case CLASSIC:
image = newBuiltinImage("/assets/img/background-classic.jpg");
break;
case TRANSLUCENT:
return new Background(new BackgroundFill(new Color(1, 1, 1, Lang.clamp(0, config().getBackgroundImageOpacity(), 100) / 100.), CornerRadii.EMPTY, Insets.EMPTY));
case TRANSLUCENT: // Deprecated
return new Background(new BackgroundFill(new Color(1, 1, 1, 0.5), CornerRadii.EMPTY, Insets.EMPTY));
case PAINT:
Paint paint = config().getBackgroundPaint();
double opacity = Lang.clamp(0, config().getBackgroundImageOpacity(), 100) / 100.;