From 97f21394a7f3f0aa5acd72efa85f09a867553519 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 23 Aug 2023 11:24:24 +0200 Subject: [PATCH] add tooltip to account tab where label is truncated --- src/main/java/com/sparrowwallet/sparrow/AppController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index fca62e8f..0c964f28 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -1654,6 +1654,9 @@ public class AppController implements Initializable { subTabLabel.setGraphic(getSubTabGlyph(wallet)); subTabLabel.setContentDisplay(ContentDisplay.TOP); subTabLabel.setAlignment(Pos.TOP_CENTER); + if(TextUtils.computeTextWidth(subTabLabel.getFont(), label, 0.0D) > (90-6)) { + subTabLabel.setTooltip(new Tooltip(label)); + } subTab.setGraphic(subTabLabel); FXMLLoader walletLoader = new FXMLLoader(getClass().getResource("wallet/wallet.fxml")); subTab.setContent(walletLoader.load());