使用 ONE_PASS_BOX 阴影代替高斯模糊 (#3458)

* 使用 ONE_PASS_BOX 代替高斯模糊

* update

* update

* update
This commit is contained in:
Glavo
2024-12-02 21:24:58 +08:00
committed by GitHub
parent 3df52b0e8f
commit 8e0f0e2a38
2 changed files with 4 additions and 9 deletions

View File

@@ -27,11 +27,10 @@ import javafx.scene.Cursor;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.control.SkinBase;
import javafx.scene.effect.BlurType;
import javafx.scene.effect.DropShadow;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
@@ -68,6 +67,7 @@ public class DecoratorSkin extends SkinBase<Decorator> {
StackPane shadowContainer = new StackPane();
shadowContainer.getStyleClass().add("body");
shadowContainer.setEffect(new DropShadow(BlurType.ONE_PASS_BOX, Color.rgb(0, 0, 0, 0.4), 10, 0.3, 0.0, 0.0));
parent = new StackPane();
Rectangle clip = new Rectangle();

View File

@@ -1307,11 +1307,6 @@
-fx-padding: 8;
}
.body {
-fx-border-radius: 5;
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.4), 10, 0.3, 0.0, 0.0);
}
.debug-border {
-fx-border-color: red;
-fx-border-width: 1;