-
Bug
-
Resolution: Unresolved
-
P4
-
jfx21, jfx25
-
generic
-
os_x
If we run below test program, background is filled with black color.
import javafx.application.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.scene.paint.*;
import javafx.stage.*;
public class TestUnifiedStage extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
boolean allowsUnified = Platform.isSupported(ConditionalFeature.UNIFIED_WINDOW);
System.err.println("Unified windows " + (allowsUnified ? "ARE" : "are NOT") + " supported");
primaryStage.setTitle("Hello World");
primaryStage.initStyle(StageStyle.UNIFIED);
final VBox vBox = new VBox();
//vBox.setAlignment(Pos.CENTER);
vBox.setStyle("-fx-background-color: transparent");
vBox.getChildren().add(new Label("Hello World"));
// remove this and it works!
primaryStage.setScene(new Scene(vBox, Color.TRANSPARENT));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Looks like the issue identified inJDK-8095040 has resurfaced. Issue can be seen in JFX25 and i have also checked that issue happens in JFX21.
If we run the same program in 8u431 it draws properly.
import javafx.application.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.scene.paint.*;
import javafx.stage.*;
public class TestUnifiedStage extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
boolean allowsUnified = Platform.isSupported(ConditionalFeature.UNIFIED_WINDOW);
System.err.println("Unified windows " + (allowsUnified ? "ARE" : "are NOT") + " supported");
primaryStage.setTitle("Hello World");
primaryStage.initStyle(StageStyle.UNIFIED);
final VBox vBox = new VBox();
//vBox.setAlignment(Pos.CENTER);
vBox.setStyle("-fx-background-color: transparent");
vBox.getChildren().add(new Label("Hello World"));
// remove this and it works!
primaryStage.setScene(new Scene(vBox, Color.TRANSPARENT));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Looks like the issue identified in
If we run the same program in 8u431 it draws properly.
- relates to
-
JDK-8095040 StageStyle.UNIFIED not working on OSX 10.9.5
-
- Resolved
-