Skip to content

Commit

Permalink
upgrade to javafx 22 with a minimum requirement of macos 11 and gtk3
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Sep 4, 2024
1 parent 17093db commit 49573d1
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ tasks.withType(AbstractArchiveTask) {
}

javafx {
version = "18"
version = headless ? "18" : "22"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.swing', 'javafx.graphics' ]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void initialize(NodeEntry rootEntry) {
getColumns().forEach(col -> col.setContextMenu(contextMenu));

setEditable(true);
setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
setEqualPreferredColumnWidths();

addressCol.setSortType(TreeTableColumn.SortType.ASCENDING);
getSortOrder().add(addressCol);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class CoinTreeTable extends TreeTableView<Entry> {
private BitcoinUnit bitcoinUnit;
private UnitFormat unitFormat;
private CurrencyRate currencyRate;
protected static final double STANDARD_WIDTH = 100.0;

public BitcoinUnit getBitcoinUnit() {
return bitcoinUnit;
Expand Down Expand Up @@ -143,4 +144,12 @@ public void setSortColumn(int columnIndex, TreeTableColumn.SortType sortType) {
getSortOrder().add(column);
}
}

@SuppressWarnings("deprecation")
protected void setEqualPreferredColumnWidths() {
for(TreeTableColumn<?, ?> column : getColumns()) {
column.setPrefWidth(STANDARD_WIDTH);
}
setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ public static void applyRowStyles(TreeTableCell<?, ?> cell, Entry entry) {
}
} else if(entry instanceof WalletSummaryDialog.UnconfirmedEntry) {
cell.getStyleClass().add("unconfirmed-row");
} else if(entry instanceof WalletSummaryDialog.SummaryEntry) {
} else if(entry instanceof WalletSummaryDialog.SummaryEntry || entry instanceof WalletSummaryDialog.AllSummaryEntry) {
cell.getStyleClass().add("summary-row");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public SearchWalletDialog(List<WalletForm> walletForms) {
results.setShowRoot(false);
results.setPrefWidth(showWallet || showAccount ? 950 : 850);
results.setUnitFormat(walletForms.iterator().next().getWallet());
results.setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
results.setEqualPreferredColumnWidths();
results.setPlaceholder(new Label("No results"));
results.setEditable(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void initialize(WalletTransactionsEntry rootEntry) {

setPlaceholder(getDefaultPlaceholder(rootEntry.getWallet()));
setEditable(true);
setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
setEqualPreferredColumnWidths();
setSortColumn(0, TreeTableColumn.SortType.DESCENDING);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void initialize(WalletUtxosEntry rootEntry) {

setPlaceholder(getDefaultPlaceholder(rootEntry.getWallet()));
setEditable(true);
setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
setEqualPreferredColumnWidths();
setSortColumn(getColumns().size() - 1, TreeTableColumn.SortType.DESCENDING);

getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public WalletSummaryDialog(List<List<WalletForm>> summaryWalletFormsList) {
table.setRoot(rootItem);
rootItem.setExpanded(true);

table.setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
table.setEqualPreferredColumnWidths();
table.setPrefWidth(450);

VBox vBox = new VBox();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class ServerAliasDialog extends Dialog<Server> {
private final TableView<ServerEntry> serverTable;
private final Button closeButton;

@SuppressWarnings("deprecation")
public ServerAliasDialog(ServerType serverType) {
this.serverType = serverType;

Expand Down
5 changes: 0 additions & 5 deletions src/main/resources/com/sparrowwallet/sparrow/darktheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
-fx-prompt-text-fill: gray;
}

.titulo{
-fx-font-weight: bold;
-fx-font-size: 18px;
}

.button{
-fx-focus-traversable: false;
}
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/com/sparrowwallet/sparrow/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
-fx-padding: 3 5;
}

.form .fieldset .legend, .table-view .column-header, .tree-table-view .column-header, VerticalHeader > Label {
-fx-font-weight: normal;
}

.form .fieldset.header .legend {
-fx-padding: 0 0 15px 0;
}
Expand Down Expand Up @@ -247,7 +251,7 @@
}

.number-field {
-fx-font-family: 'Helvetica Neue', 'System Regular';
-fx-font-family: 'Helvetica Neue Regular', 'System Regular';
}

VerticalHeader > Label.selected {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}

.listview-label {
-fx-font-weight: bold;
-fx-font-weight: normal;
-fx-font-size: 1.2em;
-fx-padding: 10 0 10 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.addresses-treetable-label {
-fx-font-weight: bold;
-fx-font-weight: normal;
-fx-font-size: 1.2em;
-fx-padding: 10 0 10 0;
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
.transactions-treetable-label {
-fx-font-weight: bold;
-fx-font-size: 1.2em;
-fx-padding: 10 0 10 0;
}

#balanceChart {
-fx-padding: 10 0 0 0;
-fx-max-width: 350px;
Expand Down
6 changes: 0 additions & 6 deletions src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
.utxos-treetable-label {
-fx-font-weight: bold;
-fx-font-size: 1.2em;
-fx-padding: 10 0 10 0;
}

.utxos-treetable .progress-bar > .bar {
-fx-padding: 0.6em;
}
Expand Down

0 comments on commit 49573d1

Please sign in to comment.