Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8116169

CSS : style -fx-shape with -fx-scale-shape shifted and not fill background

    XMLWordPrintable

Details

    Description

      The FX CSS styles -fx-scale-shape and -fx-background-color don't apply for a control correctly.

      Run this code to reproduce the issue:
      @Override
          public void start(Stage stage) throws Exception {
              BorderPane root = new BorderPane();
              
              VBox node = VBoxBuilder.create().build();
              node.setMinSize(50, 50);
              node.setStyle("-fx-border-color:blue;-fx-shape:\"M 50 50 L 150 50 L 100 150 Z\";-fx-scale-shape: false;-fx-background-color: red;");
              
              Pane pane = new Pane();
              pane.setStyle("-fx-border-color:green");
              pane.setMaxSize(100, 100);
              pane.getChildren().add(node);
              root.setCenter(pane);
              
              Scene scene = new Scene(root, 200, 200);
              stage.setScene(scene);
              stage.setTitle(VersionInfo.getRuntimeVersion());
              stage.show();
          }

      Attachments

        1. Busted.png
          Busted.png
          27 kB
        2. scale-shape-2.2.png
          scale-shape-2.2.png
          8 kB
        3. scale-shape-8.0.png
          scale-shape-8.0.png
          8 kB

        Issue Links

          Activity

            People

              rbair Richard Bair (Inactive)
              slugovoy Sergey Lugovoy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: