applying style -fx-progress-color on indeterminate progress indicator doesn't show right color right away

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P3
    • 8
    • Affects Version/s: 7u15
    • Component/s: javafx

      Hi,

      When I apply a style for a indeterminate progress indicator, the default progress-color is shown for a short period of time, instead of the expected style color.

      Test code:

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.ProgressIndicator;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class IndicatorTest extends Application {

      @Override
      public void start(Stage primaryStage) {
      VBox vBox = new VBox(5);
      ProgressIndicator progressIndicator = new ProgressIndicator();
      progressIndicator.setScaleX(2);
      progressIndicator.setScaleY(2);
      progressIndicator.setTranslateY(200);
      vBox.getChildren().add(progressIndicator);
      Scene scene = new Scene(vBox, 1000, 500);
      scene.getStylesheets().addAll(getClass().getResource("style.css").toExternalForm());
      primaryStage.setScene(scene);
      primaryStage.show();
      }

      public static void main(String[] args) {
      launch(args);
      }
      }

      style.css contains the style:

      .progress-indicator {
      -fx-progress-color: rgb(166,166,166);
      }

      If you look closely when starting the application, you can see the default progress color at first, and then the style color.. That doesn't look good. :)

            Assignee:
            Mick Fleming
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: