Force address hyperlinks to be centered

This commit is contained in:
Christoph Atteneder 2018-12-03 10:03:18 +01:00
parent 083856aace
commit 002f8f3771
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B
6 changed files with 12 additions and 0 deletions

View File

@ -1104,6 +1104,10 @@ textfield */
-fx-padding: 0 0 0 0;
}
.address-column {
-fx-alignment: center !important;
}
/*******************************************************************************
* *
* Icons *

View File

@ -377,6 +377,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
private void setAddressColumnCellFactory() {
addressColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
addressColumn.getStyleClass().add("address-column");
addressColumn.setCellFactory(
new Callback<>() {

View File

@ -285,6 +285,7 @@ public class LockedView extends ActivatableView<VBox, Void> {
private void setAddressColumnCellFactory() {
addressColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
addressColumn.getStyleClass().add("address-column");
addressColumn.setCellFactory(
new Callback<TableColumn<LockedListItem, LockedListItem>, TableCell<LockedListItem,
LockedListItem>>() {

View File

@ -284,6 +284,7 @@ public class ReservedView extends ActivatableView<VBox, Void> {
private void setAddressColumnCellFactory() {
addressColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
addressColumn.getStyleClass().add("address-column");
addressColumn.setCellFactory(
new Callback<TableColumn<ReservedListItem, ReservedListItem>, TableCell<ReservedListItem,
ReservedListItem>>() {

View File

@ -363,6 +363,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
private void setAddressColumnCellFactory() {
addressColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
addressColumn.getStyleClass().add("address-column");
addressColumn.setCellFactory(
new Callback<>() {

View File

@ -82,6 +82,8 @@ import javafx.scene.control.Tooltip;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.geometry.Pos;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.property.SimpleBooleanProperty;
@ -534,6 +536,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
private void setAddressColumnCellFactory() {
addressColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
addressColumn.getStyleClass().add("address-column");
addressColumn.setCellFactory(
new Callback<>() {
@ -552,6 +555,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
hyperlinkWithIcon = new HyperlinkWithIcon(address, AwesomeIcon.EXTERNAL_LINK);
hyperlinkWithIcon.setOnAction(event -> openBlockExplorer(item));
hyperlinkWithIcon.setTooltip(new Tooltip(Res.get("tooltip.openBlockchainForAddress", address)));
setAlignment(Pos.CENTER);
setGraphic(hyperlinkWithIcon);
} else {
setGraphic(null);