maybe fix help tooltips not appearing

This commit is contained in:
Craig Raw 2021-02-16 10:08:44 +02:00
parent 83a7f5c562
commit 3203308d82

View file

@ -1,10 +1,14 @@
package com.sparrowwallet.sparrow.control; package com.sparrowwallet.sparrow.control;
import com.sparrowwallet.sparrow.glyphfont.FontAwesome5; import com.sparrowwallet.sparrow.glyphfont.FontAwesome5;
import javafx.application.Platform;
import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty; import javafx.beans.property.StringProperty;
import javafx.event.EventHandler;
import javafx.geometry.Bounds;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.Tooltip; import javafx.scene.control.Tooltip;
import javafx.scene.input.MouseEvent;
import javafx.util.Duration; import javafx.util.Duration;
import org.controlsfx.glyphfont.Glyph; import org.controlsfx.glyphfont.Glyph;
@ -16,8 +20,9 @@ public class HelpLabel extends Label {
tooltip = new Tooltip(); tooltip = new Tooltip();
tooltip.textProperty().bind(helpTextProperty()); tooltip.textProperty().bind(helpTextProperty());
tooltip.setShowDuration(Duration.seconds(15)); tooltip.setShowDuration(Duration.seconds(15));
setTooltip(tooltip);
getStyleClass().add("help-label"); getStyleClass().add("help-label");
Platform.runLater(() -> setTooltip(tooltip));
} }
private static Glyph getHelpGlyph() { private static Glyph getHelpGlyph() {