mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-26 05:26:45 +00:00
followup
This commit is contained in:
parent
e1d9d54da3
commit
540424a2e3
1 changed files with 13 additions and 15 deletions
|
@ -24,7 +24,11 @@ public class CopyableCoinLabel extends CopyableLabel {
|
||||||
this("Unknown");
|
this("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
private final EventHandler<MouseEvent> toggleBitcoinUnit = event -> {
|
public CopyableCoinLabel(String text) {
|
||||||
|
super(text);
|
||||||
|
valueProperty().addListener((observable, oldValue, newValue) -> setValueAsText((Long)newValue, Config.get().getUnitFormat(), Config.get().getBitcoinUnit()));
|
||||||
|
|
||||||
|
setOnMouseClicked(event -> {
|
||||||
if(bitcoinUnit == null) {
|
if(bitcoinUnit == null) {
|
||||||
bitcoinUnit = Config.get().getBitcoinUnit();
|
bitcoinUnit = Config.get().getBitcoinUnit();
|
||||||
}
|
}
|
||||||
|
@ -36,13 +40,7 @@ public class CopyableCoinLabel extends CopyableLabel {
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh(Config.get().getUnitFormat(), bitcoinUnit);
|
refresh(Config.get().getUnitFormat(), bitcoinUnit);
|
||||||
};
|
});
|
||||||
|
|
||||||
public CopyableCoinLabel(String text) {
|
|
||||||
super(text);
|
|
||||||
valueProperty().addListener((observable, oldValue, newValue) -> setValueAsText((Long)newValue, Config.get().getUnitFormat(), Config.get().getBitcoinUnit()));
|
|
||||||
|
|
||||||
setOnMouseClicked(toggleBitcoinUnit);
|
|
||||||
|
|
||||||
tooltip = new Tooltip();
|
tooltip = new Tooltip();
|
||||||
contextMenu = new CoinContextMenu();
|
contextMenu = new CoinContextMenu();
|
||||||
|
|
Loading…
Reference in a new issue