fix for building on headless with earlier javafx

This commit is contained in:
Craig Raw 2025-04-03 16:11:23 +02:00
parent 4176f76ffc
commit b777c8c64d

View file

@ -1994,12 +1994,10 @@ public class AppController implements Initializable {
tabLabel.setMaxWidth(TAB_LABEL_MAX_WIDTH); tabLabel.setMaxWidth(TAB_LABEL_MAX_WIDTH);
tabLabel.setGraphic(glyph); tabLabel.setGraphic(glyph);
tabLabel.setGraphicTextGap(5.0); tabLabel.setGraphicTextGap(5.0);
tabLabel.textTruncatedProperty().addListener((_, _, newValue) -> { if(TextUtils.computeTextWidth(tabLabel.getFont(), tabName, 0.0D) > TAB_LABEL_MAX_WIDTH) {
if(newValue && name != null && !name.isEmpty()) { Tooltip tooltip = new Tooltip(tabName);
Tooltip tooltip = new Tooltip(name); tabLabel.setTooltip(tooltip);
tabLabel.setTooltip(tooltip); }
}
});
tab.setGraphic(tabLabel); tab.setGraphic(tabLabel);
tab.setContextMenu(getTabContextMenu(tab)); tab.setContextMenu(getTabContextMenu(tab));
tab.setClosable(true); tab.setClosable(true);