mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-02 03:36:24 -04:00
add copied tooltip in chat view
This commit is contained in:
parent
1edc5012f7
commit
229389b0a3
2 changed files with 9 additions and 2 deletions
|
@ -67,6 +67,7 @@ public class QRCodeWindow extends Overlay<QRCodeWindow> {
|
|||
addHeadLine();
|
||||
addMessage();
|
||||
|
||||
qrCodeImageView.setOnMouseClicked(event -> openWallet());
|
||||
GridPane.setRowIndex(qrCodeImageView, ++rowIndex);
|
||||
GridPane.setColumnSpan(qrCodeImageView, 2);
|
||||
GridPane.setHalignment(qrCodeImageView, HPos.CENTER);
|
||||
|
|
|
@ -26,7 +26,7 @@ import haveno.desktop.main.overlays.notifications.Notification;
|
|||
import haveno.desktop.main.overlays.popups.Popup;
|
||||
import haveno.desktop.util.DisplayUtils;
|
||||
import haveno.desktop.util.GUIUtil;
|
||||
|
||||
import haveno.desktop.util.Layout;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.support.SupportManager;
|
||||
import haveno.core.support.SupportSession;
|
||||
|
@ -305,7 +305,13 @@ public class ChatView extends AnchorPane {
|
|||
UserThread.execute(() -> {
|
||||
super.updateItem(message, empty);
|
||||
if (message != null && !empty) {
|
||||
copyLabel.setOnMouseClicked(e -> Utilities.copyToClipboard(messageLabel.getText()));
|
||||
copyLabel.setOnMouseClicked(e -> {
|
||||
Utilities.copyToClipboard(messageLabel.getText());
|
||||
Tooltip tp = new Tooltip(Res.get("shared.copiedToClipboard"));
|
||||
Node node = (Node) e.getSource();
|
||||
UserThread.runAfter(() -> tp.hide(), 1);
|
||||
tp.show(node, e.getScreenX() + Layout.PADDING, e.getScreenY() + Layout.PADDING);
|
||||
});
|
||||
messageLabel.setOnMouseClicked(event -> {
|
||||
if (2 > event.getClickCount()) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue