mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Extract general icon behavior ("hand cursor") and remove styles that have no effect.
This commit is contained in:
parent
867c310cd5
commit
c4f3f5cdfc
10 changed files with 22 additions and 35 deletions
|
@ -192,6 +192,11 @@ bg color of non edit textFields: fafafa
|
|||
-fx-background-color: -bs-bg-light;
|
||||
}
|
||||
|
||||
.display-text-field {
|
||||
-fx-alignment: center;
|
||||
-fx-background-color: -bs-white;
|
||||
}
|
||||
|
||||
.text-area:readonly .content {
|
||||
-fx-background-color: -bs-bg-light;
|
||||
}
|
||||
|
@ -206,6 +211,10 @@ bg color of non edit textFields: fafafa
|
|||
-fx-underline: true;
|
||||
}
|
||||
|
||||
.icon, icon:hover {
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
#icon-button {
|
||||
-fx-cursor: hand;
|
||||
-fx-background-color: transparent;
|
||||
|
@ -213,12 +222,10 @@ bg color of non edit textFields: fafafa
|
|||
|
||||
.copy-icon {
|
||||
-fx-text-fill: -fx-accent;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.copy-icon-disputes {
|
||||
-fx-text-fill: -bs-white;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.copy-icon:hover {
|
||||
|
@ -227,82 +234,61 @@ bg color of non edit textFields: fafafa
|
|||
|
||||
.external-link-icon {
|
||||
-fx-text-fill: -fx-accent;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.received-funds-icon {
|
||||
-fx-text-fill: -bs-green-soft;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.received-funds-icon:hover {
|
||||
-fx-text-fill: -bs-black;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.sent-funds-icon {
|
||||
-fx-text-fill: -bs-red-soft;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.sent-funds-icon:hover {
|
||||
-fx-text-fill: -bs-black;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
/* TODO: not used at the moment*/
|
||||
.internal-funds-icon {
|
||||
-fx-text-fill: -bs-dark-grey;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
|
||||
.dao-tx-type-unverified-icon,
|
||||
.dao-tx-type-unverified-icon:hover {
|
||||
-fx-text-fill: -bs-yellow;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.dao-tx-type-invalid-icon,
|
||||
.dao-tx-type-invalid-icon:hover {
|
||||
-fx-text-fill: -bs-error-red;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.dao-tx-type-default-icon,
|
||||
.dao-tx-type-default-icon:hover {
|
||||
-fx-text-fill: -bs-grey;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.dao-tx-type-genesis-icon,
|
||||
.dao-tx-type-genesis-icon:hover {
|
||||
-fx-text-fill: -fx-accent;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
|
||||
.dao-tx-type-received-funds-icon,
|
||||
.dao-tx-type-received-funds-icon:hover {
|
||||
-fx-text-fill: -bs-green-soft;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.dao-tx-type-sent-funds-icon,
|
||||
.dao-tx-type-sent-funds-icon:hover {
|
||||
-fx-text-fill: -bs-red-soft;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.dao-tx-type-default-icon,
|
||||
.dao-tx-type-default-icon:hover {
|
||||
-fx-text-fill: -bs-grey;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.dao-tx-type-issuance-icon,
|
||||
.dao-tx-type-issuance-icon:hover {
|
||||
-fx-text-fill: -bs-green;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -72,14 +72,14 @@ public class AddressTextField extends AnchorPane {
|
|||
|
||||
Label extWalletIcon = new Label();
|
||||
extWalletIcon.setLayoutY(3);
|
||||
extWalletIcon.getStyleClass().add("copy-icon");
|
||||
extWalletIcon.getStyleClass().addAll("icon", "copy-icon");
|
||||
extWalletIcon.setTooltip(new Tooltip(tooltipText));
|
||||
AwesomeDude.setIcon(extWalletIcon, AwesomeIcon.SIGNIN);
|
||||
extWalletIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(this::openWallet));
|
||||
|
||||
Label copyIcon = new Label();
|
||||
copyIcon.setLayoutY(3);
|
||||
copyIcon.getStyleClass().add("copy-icon");
|
||||
copyIcon.getStyleClass().addAll("icon", "copy-icon");
|
||||
Tooltip.install(copyIcon, new Tooltip(Res.get("addressTextField.copyToClipboard")));
|
||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
||||
copyIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(() -> {
|
||||
|
|
|
@ -22,6 +22,7 @@ public class AddressWithIconAndDirection extends AnchorPane {
|
|||
public AddressWithIconAndDirection(String text, String address, AwesomeIcon awesomeIcon, boolean received) {
|
||||
Label directionIcon = new Label();
|
||||
directionIcon.setLayoutY(3);
|
||||
directionIcon.getStyleClass().add("icon");
|
||||
directionIcon.getStyleClass().add(received ? "received-funds-icon" : "sent-funds-icon");
|
||||
AwesomeDude.setIcon(directionIcon, received ? AwesomeIcon.SIGNIN : AwesomeIcon.SIGNOUT);
|
||||
directionIcon.setMouseTransparent(true);
|
||||
|
@ -45,7 +46,7 @@ public class AddressWithIconAndDirection extends AnchorPane {
|
|||
|
||||
openLinkIcon = new Label();
|
||||
openLinkIcon.setLayoutY(3);
|
||||
openLinkIcon.getStyleClass().add("external-link-icon");
|
||||
openLinkIcon.getStyleClass().addAll("icon", "external-link-icon");
|
||||
openLinkIcon.setOpacity(0.7);
|
||||
AwesomeDude.setIcon(openLinkIcon, awesomeIcon);
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class BsqAddressTextField extends AnchorPane {
|
|||
|
||||
Label copyIcon = new Label();
|
||||
copyIcon.setLayoutY(3);
|
||||
copyIcon.getStyleClass().add("copy-icon");
|
||||
copyIcon.getStyleClass().addAll("icon", "copy-icon");
|
||||
copyIcon.setTooltip(new Tooltip(Res.get("addressTextField.copyToClipboard")));
|
||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
||||
copyIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(() -> {
|
||||
|
|
|
@ -29,7 +29,7 @@ public class HyperlinkWithIcon extends HBox {
|
|||
hyperlink = new Hyperlink(text);
|
||||
|
||||
icon = new Label();
|
||||
icon.getStyleClass().add("external-link-icon");
|
||||
icon.getStyleClass().addAll("icon", "external-link-icon");
|
||||
AwesomeDude.setIcon(icon, awesomeIcon);
|
||||
icon.setMinWidth(20);
|
||||
icon.setOpacity(0.7);
|
||||
|
|
|
@ -42,7 +42,7 @@ public class TextFieldWithCopyIcon extends AnchorPane {
|
|||
public TextFieldWithCopyIcon() {
|
||||
Label copyIcon = new Label();
|
||||
copyIcon.setLayoutY(3);
|
||||
copyIcon.getStyleClass().add("copy-icon");
|
||||
copyIcon.getStyleClass().addAll("icon", "copy-icon");
|
||||
copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));
|
||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
||||
AnchorPane.setRightAnchor(copyIcon, 0.0);
|
||||
|
|
|
@ -75,7 +75,7 @@ public class TxIdTextField extends AnchorPane {
|
|||
|
||||
copyIcon = new Label();
|
||||
copyIcon.setLayoutY(3);
|
||||
copyIcon.getStyleClass().add("copy-icon");
|
||||
copyIcon.getStyleClass().addAll("icon", "copy-icon");
|
||||
copyIcon.setTooltip(new Tooltip(Res.get("txIdTextField.copyIcon.tooltip")));
|
||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
|
||||
AnchorPane.setRightAnchor(copyIcon, 30.0);
|
||||
|
@ -83,7 +83,7 @@ public class TxIdTextField extends AnchorPane {
|
|||
Tooltip tooltip = new Tooltip(Res.get("txIdTextField.blockExplorerIcon.tooltip"));
|
||||
|
||||
blockExplorerIcon = new Label();
|
||||
blockExplorerIcon.getStyleClass().add("external-link-icon");
|
||||
blockExplorerIcon.getStyleClass().addAll("icon", "external-link-icon");
|
||||
blockExplorerIcon.setTooltip(tooltip);
|
||||
AwesomeDude.setIcon(blockExplorerIcon, AwesomeIcon.EXTERNAL_LINK);
|
||||
blockExplorerIcon.setMinWidth(20);
|
||||
|
|
|
@ -284,7 +284,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
|||
textField.setPrefWidth(115); //140
|
||||
textField.setMouseTransparent(true);
|
||||
textField.setFocusTraversable(false);
|
||||
textField.setStyle("-fx-alignment: center; -fx-background-color: white;");
|
||||
textField.getStyleClass().add("display-text-field");
|
||||
|
||||
Label label = new Label(text);
|
||||
label.setId("nav-balance-label");
|
||||
|
|
|
@ -481,7 +481,7 @@ public class BsqTxView extends ActivatableView<GridPane, Void> {
|
|||
break;
|
||||
}
|
||||
Label label = AwesomeDude.createIconLabel(awesomeIcon);
|
||||
label.getStyleClass().add(style);
|
||||
label.getStyleClass().addAll("icon", style);
|
||||
label.setTooltip(new Tooltip(toolTipText));
|
||||
setGraphic(label);
|
||||
} else {
|
||||
|
|
|
@ -852,7 +852,7 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
|
|||
|
||||
// Need to set it here otherwise style is not correct
|
||||
AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY, "16.0");
|
||||
copyIcon.getStyleClass().add("copy-icon-disputes");
|
||||
copyIcon.getStyleClass().addAll("icon", "copy-icon-disputes");
|
||||
|
||||
// TODO There are still some cell rendering issues on updates
|
||||
setGraphic(messageAnchorPane);
|
||||
|
|
Loading…
Add table
Reference in a new issue