Skip to content

Commit

Permalink
使用 ONE_PASS_BOX 阴影代替高斯模糊 (#3458)
Browse files Browse the repository at this point in the history
* 使用 ONE_PASS_BOX 代替高斯模糊

* update

* update

* update
  • Loading branch information
Glavo authored Dec 2, 2024
1 parent 3df52b0 commit 8e0f0e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
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;
Expand Down Expand Up @@ -68,6 +67,7 @@ public DecoratorSkin(Decorator control) {

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();
Expand Down
5 changes: 0 additions & 5 deletions HMCL/src/main/resources/assets/css/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8e0f0e2

Please sign in to comment.