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

Styles are not applied (width, height, tileWidth..) in layouts if they are not initilizated in object creation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • fx2.0
    • fx2.0
    • javafx

      This simple code fails:


      public function run()
      {
          var rec1 = Rectangle{
              width: 50;
              height: 50;
              fill: Color.BLUE
          }
          var rec2 = Rectangle{
              width: 50;
              height: 50;
              fill: Color.RED
          }
          var rec3 = Rectangle{
              width: 50;
              height: 50;
              fill: Color.BLUE
          }
          var rec4 = Rectangle{
              width: 50;
              height: 50;
              fill: Color.RED
          }
          Stage{
              width: 400;
              height: 400;

              scene: Scene{
                  content: [Tile{
                          content: [rec1, rec2]
                          styleClass: "tileStyle";
                          }
                          Tile{
                                  layoutY: 100;
                                  tileWidth: 1;
                                  width: 1;
                                  styleClass: "tileStyle";
                                  content: [rec3, rec4]}]
                  stylesheets: ["{__DIR__}styles.css"]
              }

          }

      }

      And the style file is:

      .tileStyle {
          width: 200;
          tileWidth: 100;
          vertical: false;
      }

        1. tileError.png
          tileError.png
          3 kB
        2. TestTileStyles.fx
          1 kB
        3. styles.css
          0.3 kB

            dgrieve David Grieve
            anruizjfx Ander Ruiz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: