mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
decrease show delay on table tooltips
This commit is contained in:
parent
414c12aae4
commit
78a6ce4237
4 changed files with 10 additions and 0 deletions
|
@ -9,6 +9,7 @@ import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.ContentDisplay;
|
import javafx.scene.control.ContentDisplay;
|
||||||
import javafx.scene.control.Tooltip;
|
import javafx.scene.control.Tooltip;
|
||||||
import javafx.scene.control.TreeTableCell;
|
import javafx.scene.control.TreeTableCell;
|
||||||
|
import javafx.util.Duration;
|
||||||
import org.controlsfx.glyphfont.Glyph;
|
import org.controlsfx.glyphfont.Glyph;
|
||||||
|
|
||||||
public class AddressCell extends TreeTableCell<Entry, UtxoEntry.AddressStatus> {
|
public class AddressCell extends TreeTableCell<Entry, UtxoEntry.AddressStatus> {
|
||||||
|
@ -35,6 +36,7 @@ public class AddressCell extends TreeTableCell<Entry, UtxoEntry.AddressStatus> {
|
||||||
setText(address.toString());
|
setText(address.toString());
|
||||||
setContextMenu(new EntryCell.AddressContextMenu(address, utxoEntry.getOutputDescriptor(), new NodeEntry(utxoEntry.getWallet(), utxoEntry.getNode())));
|
setContextMenu(new EntryCell.AddressContextMenu(address, utxoEntry.getOutputDescriptor(), new NodeEntry(utxoEntry.getWallet(), utxoEntry.getNode())));
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
|
tooltip.setShowDelay(Duration.millis(250));
|
||||||
tooltip.setText(getTooltipText(utxoEntry, addressStatus.isDuplicate()));
|
tooltip.setText(getTooltipText(utxoEntry, addressStatus.isDuplicate()));
|
||||||
setTooltip(tooltip);
|
setTooltip(tooltip);
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import javafx.scene.control.ContentDisplay;
|
||||||
import javafx.scene.control.Tooltip;
|
import javafx.scene.control.Tooltip;
|
||||||
import javafx.scene.control.TreeTableCell;
|
import javafx.scene.control.TreeTableCell;
|
||||||
import javafx.scene.layout.Region;
|
import javafx.scene.layout.Region;
|
||||||
|
import javafx.util.Duration;
|
||||||
import org.controlsfx.tools.Platform;
|
import org.controlsfx.tools.Platform;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
@ -24,6 +25,7 @@ class CoinCell extends TreeTableCell<Entry, Number> {
|
||||||
public CoinCell() {
|
public CoinCell() {
|
||||||
super();
|
super();
|
||||||
tooltip = new Tooltip();
|
tooltip = new Tooltip();
|
||||||
|
tooltip.setShowDelay(Duration.millis(500));
|
||||||
getStyleClass().add("coin-cell");
|
getStyleClass().add("coin-cell");
|
||||||
if(Platform.getCurrent() == Platform.OSX) {
|
if(Platform.getCurrent() == Platform.OSX) {
|
||||||
getStyleClass().add("number-field");
|
getStyleClass().add("number-field");
|
||||||
|
|
|
@ -7,6 +7,7 @@ import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.input.Clipboard;
|
import javafx.scene.input.Clipboard;
|
||||||
import javafx.scene.input.ClipboardContent;
|
import javafx.scene.input.ClipboardContent;
|
||||||
|
import javafx.util.Duration;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
@ -46,6 +47,7 @@ public class DateCell extends TreeTableCell<Entry, Entry> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
|
tooltip.setShowDelay(Duration.millis(250));
|
||||||
int height = utxoEntry.getHashIndex().getHeight();
|
int height = utxoEntry.getHashIndex().getHeight();
|
||||||
tooltip.setText(height > 0 ? Integer.toString(height) : "Mempool");
|
tooltip.setText(height > 0 ? Integer.toString(height) : "Mempool");
|
||||||
setTooltip(tooltip);
|
setTooltip(tooltip);
|
||||||
|
|
|
@ -20,6 +20,7 @@ import javafx.scene.control.*;
|
||||||
import javafx.scene.input.Clipboard;
|
import javafx.scene.input.Clipboard;
|
||||||
import javafx.scene.input.ClipboardContent;
|
import javafx.scene.input.ClipboardContent;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
|
import javafx.util.Duration;
|
||||||
import org.controlsfx.glyphfont.FontAwesome;
|
import org.controlsfx.glyphfont.FontAwesome;
|
||||||
import org.controlsfx.glyphfont.Glyph;
|
import org.controlsfx.glyphfont.Glyph;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -70,6 +71,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
|
tooltip.setShowDelay(Duration.millis(250));
|
||||||
tooltip.setText(getTooltip(transactionEntry));
|
tooltip.setText(getTooltip(transactionEntry));
|
||||||
setTooltip(tooltip);
|
setTooltip(tooltip);
|
||||||
|
|
||||||
|
@ -114,6 +116,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> {
|
||||||
setText(address.toString());
|
setText(address.toString());
|
||||||
setContextMenu(new AddressContextMenu(address, nodeEntry.getOutputDescriptor(), nodeEntry));
|
setContextMenu(new AddressContextMenu(address, nodeEntry.getOutputDescriptor(), nodeEntry));
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
|
tooltip.setShowDelay(Duration.millis(250));
|
||||||
tooltip.setText(nodeEntry.getNode().toString());
|
tooltip.setText(nodeEntry.getNode().toString());
|
||||||
setTooltip(tooltip);
|
setTooltip(tooltip);
|
||||||
getStyleClass().add("address-cell");
|
getStyleClass().add("address-cell");
|
||||||
|
@ -150,6 +153,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> {
|
||||||
setText(hashIndexEntry.getDescription());
|
setText(hashIndexEntry.getDescription());
|
||||||
setContextMenu(new HashIndexEntryContextMenu(getTreeTableView(), hashIndexEntry));
|
setContextMenu(new HashIndexEntryContextMenu(getTreeTableView(), hashIndexEntry));
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
|
tooltip.setShowDelay(Duration.millis(250));
|
||||||
tooltip.setText(hashIndexEntry.getHashIndex().toString());
|
tooltip.setText(hashIndexEntry.getHashIndex().toString());
|
||||||
setTooltip(tooltip);
|
setTooltip(tooltip);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue