Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Add a notification bubble that appears when you click the copy to cli…
Browse files Browse the repository at this point in the history
…pboard address button to let users know what happened.
  • Loading branch information
mikehearn committed Dec 10, 2014
1 parent 8c5333d commit b5f564c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import net.glxn.qrgen.image.ImageType;
import org.bitcoinj.core.Address;
import org.bitcoinj.uri.BitcoinURI;
import org.controlsfx.control.PopOver;

import java.awt.*;
import java.io.ByteArrayInputStream;
Expand Down Expand Up @@ -119,6 +120,14 @@ protected void requestMoney(MouseEvent event) {
@FXML
protected void copyWidgetClicked(MouseEvent event) {
copyAddress(null);

Label content = new Label("Address copied to clipboard");
content.setStyle("-fx-font-size: 12; -fx-padding: 0 20 0 20");
PopOver popover = new PopOver(content);
popover.setDetachable(false);
popover.setArrowLocation(PopOver.ArrowLocation.TOP_CENTER);
popover.show(copyWidget);
GuiUtils.runOnGuiThreadAfter(2000, () -> popover.hide(GuiUtils.UI_ANIMATION_TIME));
}

@FXML
Expand Down

0 comments on commit b5f564c

Please sign in to comment.