FULL PRODUCT VERSION :
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OS X El Capitan 10.11.5
EXTRA RELEVANT SYSTEM CONFIGURATION :
MacBook Pro (Retina, 13-inch, Late 2013)
Processor 2,8 GHz Intel Core i7
Memory 16 GB 1600 MHz DDR3
Graphics Intel Iris 1536 MB
A DESCRIPTION OF THE PROBLEM :
Given an application that uses a javafx.scene.control.MenuBar with one or more javafx.scene.control.Menu with one or more javafx.scene.control.MenuItem.
When starting my JavaFX application on a secondary monitor (through DisplayPort), and then moving the application to my built-in 13 inch retina display, the scaling of the MenuItem's are off. The text appears abnormally large and the menu renders useless (Most of the MenuItems are too big to fit inside the drop down menu)
Here's a screenshot I took after moving the application to my retina display, and then clicking my menu to see it's menuItems:
http://i.imgur.com/HjCwAZN.png
Slightly off topic: I notice a "jump" in the graphics while moving the window from one non-retina screen to a retina screen. This is no problem for me, just wondering if you are aware of that problem
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Start application on non-retina screen
2. Click first menu
3. Verify it looks as it should
4. Move application window to a retina screen
5. Click first menu
6. Notice menuItem's are way too big.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected the scaling of the MenuItems to be the same as the rest of the application. Aka, the text should not be abnormally large, and all menuItems should fit inside it's menu.
ACTUAL -
The menuItem's text is not scaling properly. The text is abnormally large and all menuItems does not fit inside the Menu
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No crashes / errors
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
VBox root = new VBox();
MenuBar menuBar = new MenuBar();
Menu menu1 = new Menu("Application");
menu1.getItems().add(new MenuItem("About"));
menu1.getItems().add(new MenuItem("Exit"));
menuBar.getMenus().add(menu1);
VBox.setVgrow(menuBar, Priority.ALWAYS);
root.getChildren().add(menuBar);
primaryStage.setScene(new Scene(root));
primaryStage.setMinWidth(700);
primaryStage.setMinHeight(300);
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround found.