Bug: ToolBar always using overflow menu whenever a scaled resolution set
Cormac Redmond
credmond at certak.com
Sat Jul 19 10:11:33 UTC 2025
Hi,
There's a bug whenever using a ToolBar on Windows if you set your
resolution scale > 100% (which is quite common). E.g., 125%:
[image: image.png]
E.g., this is what a ToolBar always renders if scale is 125%:
[image: image.png]
As compared to what you'd expect (scale set to normal/100%):
[image: image.png]
Very easy to reproduce the above, set your scale to 125% and run this:
public class ToolbarBugApp extends Application {
@Override
public void start(Stage primaryStage) {
BorderPane bp = new BorderPane();
// Wrapping in HBox and using button with 13+ chars causes bug
bp.setTop(new HBox(new ToolBar(new Button("Create Schema")))); //
BUG
// bp.setTop(new ToolBar(new Button("Create Schema"))); // NO BUG
(no HBox)
// bp.setTop(new HBox(new ToolBar(new Button("Create Schem")))); //
NO BUG (12 chars)
primaryStage.setScene(new Scene(bp, 600, 400));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
As per the comments, this bug appears to happen when your ToolBar is
wrapped in a HBox and contains a Button that has 13+ characters, for
example. This is quite a serious bug, in my opinion.
I believe this is present in JFX 24 and the JFX 25 master branch.
Kind Regards,
*Cormac Redmond*
Software Engineer, Certak Ltd.
e: credmond at certak.com | m: +353 (0) 86 268 2152 | w: www.certak.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250719/bb916437/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 14011 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250719/bb916437/image-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 6945 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250719/bb916437/image-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 6634 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250719/bb916437/image-0005.png>
More information about the openjfx-dev
mailing list