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

Modena style: disabled label does not look disabled.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • None
    • b88

      In Modena style a disabled label does not look disabled.
      It looks the same as a normal label. I expected it to have opacity like in Caspian.


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

      public class TestApp5 extends Application {

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

          @Override
          public void start(Stage stage) throws Exception {

              Label label = new Label("This is a normal label");
              Label disabled = new Label("This is a disabled label");
              disabled.setDisable(true);

              setUserAgentStylesheet(STYLESHEET_MODENA);

              VBox vBox = new VBox();
              vBox.getChildren().add(label);
              vBox.getChildren().add(disabled);

              System.out.println("JavaFX Version: " + System.getProperty("javafx.runtime.version"));
              Scene scene = new Scene(vBox, 600, 400);

              stage.setScene(scene);
              stage.centerOnScreen();
              stage.show();
          }
      }

            jasper Jasper Potts (Inactive)
            cschudtjfx Christian Schudt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: