-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: jfx25
-
Component/s: javafx
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
When using Stage.initStyle(StageStyle.EXTENDED) on a Windows 10 system, the top border of the window is not displayed. This issue is particularly noticeable when the Windows 10 system is configured to show accent colors on window titlebars, as the left, right, and bottom borders correctly reflect the OS-defined window border color, but the top border remains invisible.
It is possible to implement a workaround using JNA by querying the Windows registry to retrieve the accent color and setting the top border of the root JavaFX node accordingly. However, this approach is inconvenient and adds unnecessary complexity to the application.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Configure a Windows 10 system to use accent colors for window titlebars.
2. Create a JavaFX application and initialize a stage with Stage.initStyle(StageStyle.EXTENDED).
3. Launch the application and observe the window borders.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
All window borders (top, left, right, and bottom) should consistently display the OS-defined accent color, as configured in Windows 10 settings.
ACTUAL -
The top border of the window is not visible, while the left, right, and bottom borders correctly display the OS-defined accent color. This results in an inconsistent and visually incomplete window appearance.
---------- BEGIN SOURCE ----------
HeaderBar headerBar = new HeaderBar();
var borderPane = new BorderPane();
borderPane.setTop(headerBar);
Scene scene = new Scene(borderPane, 320, 240);
stage.setScene(scene);
stage.initStyle(StageStyle.EXTENDED);
stage.show();
---------- END SOURCE ----------
When using Stage.initStyle(StageStyle.EXTENDED) on a Windows 10 system, the top border of the window is not displayed. This issue is particularly noticeable when the Windows 10 system is configured to show accent colors on window titlebars, as the left, right, and bottom borders correctly reflect the OS-defined window border color, but the top border remains invisible.
It is possible to implement a workaround using JNA by querying the Windows registry to retrieve the accent color and setting the top border of the root JavaFX node accordingly. However, this approach is inconvenient and adds unnecessary complexity to the application.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Configure a Windows 10 system to use accent colors for window titlebars.
2. Create a JavaFX application and initialize a stage with Stage.initStyle(StageStyle.EXTENDED).
3. Launch the application and observe the window borders.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
All window borders (top, left, right, and bottom) should consistently display the OS-defined accent color, as configured in Windows 10 settings.
ACTUAL -
The top border of the window is not visible, while the left, right, and bottom borders correctly display the OS-defined accent color. This results in an inconsistent and visually incomplete window appearance.
---------- BEGIN SOURCE ----------
HeaderBar headerBar = new HeaderBar();
var borderPane = new BorderPane();
borderPane.setTop(headerBar);
Scene scene = new Scene(borderPane, 320, 240);
stage.setScene(scene);
stage.initStyle(StageStyle.EXTENDED);
stage.show();
---------- END SOURCE ----------