package io.bisq.gui.components;

import de.jensd.fx.fontawesome.AwesomeDude;
import de.jensd.fx.fontawesome.AwesomeIcon;
import javafx.scene.control.ContentDisplay;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;

public class HyperlinkWithIcon extends Hyperlink {

    public HyperlinkWithIcon(String text) {
        this(text, AwesomeIcon.INFO_SIGN);
    }

    public HyperlinkWithIcon(String text, AwesomeIcon awesomeIcon) {

        super(text);

        Label icon = new Label();
        AwesomeDude.setIcon(icon, awesomeIcon);
        icon.setMinWidth(20);
        icon.setOpacity(0.7);
        icon.getStyleClass().add("hyperlink");

        setGraphic(icon);
        setContentDisplay(ContentDisplay.RIGHT);

        tooltipProperty().addListener((observable, oldValue, newValue) -> newValue.setStyle("-fx-text-fill: -bs-black"));
    }

    public void clear() {
        setText("");
        setGraphic(null);
    }
}

@@ -114,16 +114,47 @@
 meIcon;%0A
+import javafx.geometry.Insets;%0A
 import j
@@ -690,16 +690,56 @@
 rlink%22);
+%0A        icon.setPadding(new Insets(0));
 %0A%0A      
@@ -807,16 +807,113 @@
 RIGHT);%0A
+        setGraphicTextGap(7.0);%0A%0A        //TODO: replace workaround of setting the style this way
 %0A       

Fix height of blockconfirmation icon and reduces row height