mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
provide help tooltips on policy types and script types
This commit is contained in:
parent
0097a1ecbc
commit
7bc8bdc13e
4 changed files with 10 additions and 2 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit a38206f17cd125044d87eb85bf2cf6dcd055e9a0
|
||||
Subproject commit 4d61585e4ce9fb346a44a875de47e9d5ff1cebe2
|
|
@ -72,6 +72,9 @@ public class FileWalletKeystoreImportPane extends FileImportPane {
|
|||
ComboBox<ScriptType> scriptTypeComboBox = new ComboBox<>(FXCollections.observableArrayList(ScriptType.getAddressableScriptTypes(PolicyType.SINGLE)));
|
||||
scriptTypeComboBox.setValue(ScriptType.P2WPKH);
|
||||
|
||||
HelpLabel helpLabel = new HelpLabel();
|
||||
helpLabel.setHelpText("P2WPKH is a Native Segwit type and is usually the best choice for new wallets.\nP2SH-P2WPKH is a Wrapped Segwit type and is a reasonable choice for the widest compatibility.\nP2PKH is a Legacy type and should be avoided for new wallets.\nFor existing wallets, be sure to choose the type that matches the wallet you are importing.");
|
||||
|
||||
Region region = new Region();
|
||||
HBox.setHgrow(region, Priority.SOMETIMES);
|
||||
|
||||
|
@ -97,7 +100,7 @@ public class FileWalletKeystoreImportPane extends FileImportPane {
|
|||
HBox contentBox = new HBox();
|
||||
contentBox.setAlignment(Pos.CENTER_RIGHT);
|
||||
contentBox.setSpacing(20);
|
||||
contentBox.getChildren().addAll(label, scriptTypeComboBox, region, importFileButton);
|
||||
contentBox.getChildren().addAll(label, scriptTypeComboBox, helpLabel, region, importFileButton);
|
||||
contentBox.setPadding(new Insets(10, 30, 10, 30));
|
||||
contentBox.setPrefHeight(60);
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import javafx.beans.property.SimpleStringProperty;
|
|||
import javafx.beans.property.StringProperty;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.Tooltip;
|
||||
import javafx.util.Duration;
|
||||
import org.controlsfx.glyphfont.Glyph;
|
||||
|
||||
public class HelpLabel extends Label {
|
||||
|
@ -14,6 +15,7 @@ public class HelpLabel extends Label {
|
|||
super("", getHelpGlyph());
|
||||
tooltip = new Tooltip();
|
||||
tooltip.textProperty().bind(helpTextProperty());
|
||||
tooltip.setShowDuration(Duration.seconds(15));
|
||||
setTooltip(tooltip);
|
||||
getStyleClass().add("help-label");
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<?import org.fxmisc.flowless.VirtualizedScrollPane?>
|
||||
<?import org.controlsfx.glyphfont.Glyph?>
|
||||
|
||||
<?import com.sparrowwallet.sparrow.control.HelpLabel?>
|
||||
<BorderPane stylesheets="@settings.css, @wallet.css, @../script.css, @../descriptor.css, @../general.css" styleClass="wallet-pane" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.sparrowwallet.sparrow.wallet.SettingsController">
|
||||
<center>
|
||||
<GridPane hgap="10.0" vgap="10.0">
|
||||
|
@ -40,6 +41,7 @@
|
|||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
<HelpLabel helpText="Single signature wallets use a single keystore (hardware wallet or seed).\nMultisignature wallets require multiple keystores (N), of which a certain number (M) need to sign." />
|
||||
</Field>
|
||||
<Field text="Script Type:">
|
||||
<ComboBox fx:id="scriptType">
|
||||
|
@ -55,6 +57,7 @@
|
|||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
<HelpLabel helpText="P2WPKH and P2WSH are Native Segwit types and are usually the best choice.\nP2SH-P2WPKH and P2SH-P2WSH are Wrapped Segwit types and a good choice for the widest compatibility.\nP2PKH and P2SH are Legacy types and should be avoided, unless configuring an old wallet." />
|
||||
</Field>
|
||||
</Fieldset>
|
||||
</Form>
|
||||
|
|
Loading…
Reference in a new issue