What changed, and why it matters
This is a small UI follow-up change. It moves a visual styling marker from one container element (rootStack) to another (rootBox) so that a user preference—chunking Bitcoin addresses into colored groups—applies correctly across all windows, including ones opened after startup. There is no security-relevant behavior here.
No security action required. Treat as a normal UI bugfix follow-up.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors how the ‘chunk-addresses’ CSS class is applied. Previously it was toggled on rootStack inside AppController; now it is toggled on rootBox (the FXML root VBox) and also applied in AppServices.setStageIconAndStyle() when a new Stage/Scene is created. CSS selectors in general.css and darktheme.css are updated from ‘#rootStack.chunk-addresses’ to ‘.chunk-addresses’. This is purely a presentation-layer fix for the address-chunking feature.
Changed components
src/main/java/com/sparrowwallet/sparrow/AppController.javasrc/main/java/com/sparrowwallet/sparrow/AppServices.javasrc/main/resources/com/sparrowwallet/sparrow/app.fxmlsrc/main/resources/com/sparrowwallet/sparrow/darktheme.csssrc/main/resources/com/sparrowwallet/sparrow/general.cssInspect captured patch +25 / −17
diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java
index 00ab0af..64168bc 100644
--- a/src/main/java/com/sparrowwallet/sparrow/AppController.java
+++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java
@@ -90,6 +90,9 @@ public class AppController implements Initializable {
public static final String TRYING_ANOTHER_SERVER_MESSAGE = "trying another server...";
public static final String JPACKAGE_APP_PATH = "jpackage.app-path";
+ @FXML
+ private VBox rootBox;
+
@FXML
private MenuItem saveTransaction;
@@ -378,7 +381,7 @@ public class AppController implements Initializable {
chunkAddresses.setSelected(Config.get().isChunkAddresses());
if(Config.get().isChunkAddresses()) {
- rootStack.getStyleClass().add("chunk-addresses");
+ rootBox.getStyleClass().add("chunk-addresses");
}
hideEmptyUsedAddressesProperty.set(Config.get().isHideEmptyUsedAddresses());
hideEmptyUsedAddresses.selectedProperty().bindBidirectional(hideEmptyUsedAddressesProperty);
@@ -957,10 +960,10 @@ public class AppController implements Initializable {
public void chunkAddresses(ActionEvent event) {
CheckMenuItem item = (CheckMenuItem)event.getSource();
Config.get().setChunkAddresses(item.isSelected());
- if(item.isSelected() && !rootStack.getStyleClass().contains("chunk-addresses")) {
- rootStack.getStyleClass().add("chunk-addresses");
+ if(item.isSelected() && !rootBox.getStyleClass().contains("chunk-addresses")) {
+ rootBox.getStyleClass().add("chunk-addresses");
} else {
- rootStack.getStyleClass().remove("chunk-addresses");
+ rootBox.getStyleClass().remove("chunk-addresses");
}
}
diff --git a/src/main/java/com/sparrowwallet/sparrow/AppServices.java b/src/main/java/com/sparrowwallet/sparrow/AppServices.java
index 8c9ff60..3f54cb2 100644
--- a/src/main/java/com/sparrowwallet/sparrow/AppServices.java
+++ b/src/main/java/com/sparrowwallet/sparrow/AppServices.java
@@ -887,8 +887,13 @@ public class AppServices {
Stage stage = (Stage)window;
stage.getIcons().add(getWindowIcon());
- if(stage.getScene() != null && Config.get().getTheme() == Theme.DARK) {
- stage.getScene().getStylesheets().add(AppServices.class.getResource("darktheme.css").toExternalForm());
+ if(stage.getScene() != null) {
+ if(Config.get().getTheme() == Theme.DARK) {
+ stage.getScene().getStylesheets().add(AppServices.class.getResource("darktheme.css").toExternalForm());
+ }
+ if(Config.get().isChunkAddresses()) {
+ stage.getScene().getRoot().getStyleClass().add("chunk-addresses");
+ }
}
}
diff --git a/src/main/resources/com/sparrowwallet/sparrow/app.fxml b/src/main/resources/com/sparrowwallet/sparrow/app.fxml
index 890a573..2a73108 100644
--- a/src/main/resources/com/sparrowwallet/sparrow/app.fxml
+++ b/src/main/resources/com/sparrowwallet/sparrow/app.fxml
@@ -11,7 +11,7 @@
<?import com.sparrowwallet.sparrow.Theme?>
<?import impl.org.controlsfx.skin.DecorationPane?>
-<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="200" minWidth="350" prefHeight="770.0" prefWidth="1070.0" fx:controller="com.sparrowwallet.sparrow.AppController" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1">
+<VBox fx:id="rootBox" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="200" minWidth="350" prefHeight="770.0" prefWidth="1070.0" fx:controller="com.sparrowwallet.sparrow.AppController" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1">
<children>
<MenuBar useSystemMenuBar="true">
<menus>
diff --git a/src/main/resources/com/sparrowwallet/sparrow/darktheme.css b/src/main/resources/com/sparrowwallet/sparrow/darktheme.css
index afa9d3c..9ed4d8b 100644
--- a/src/main/resources/com/sparrowwallet/sparrow/darktheme.css
+++ b/src/main/resources/com/sparrowwallet/sparrow/darktheme.css
@@ -388,12 +388,12 @@ HorizontalHeaderColumn > TableColumnHeader.column-header.table-column{
-fx-fill: white;
}
-.root #rootStack.chunk-addresses .text-field .address-chunk.alternate,
-.root #rootStack.chunk-addresses .label .address-chunk.alternate,
-.root #rootStack.chunk-addresses .tree-table-view:focused .address-chunk.alternate {
+.root.chunk-addresses .text-field .address-chunk.alternate,
+.root.chunk-addresses .label .address-chunk.alternate,
+.root.chunk-addresses .tree-table-view:focused .address-chunk.alternate {
-fx-fill: derive(-fx-text-inner-color, -35%);
}
-.root #rootStack.chunk-addresses .tree-table-view .tree-table-row-cell:selected .address-chunk.alternate {
+.root.chunk-addresses .tree-table-view .tree-table-row-cell:selected .address-chunk.alternate {
-fx-fill: derive(-fx-selection-bar-text, -35%);
}
diff --git a/src/main/resources/com/sparrowwallet/sparrow/general.css b/src/main/resources/com/sparrowwallet/sparrow/general.css
index edcbd07..6e16efe 100644
--- a/src/main/resources/com/sparrowwallet/sparrow/general.css
+++ b/src/main/resources/com/sparrowwallet/sparrow/general.css
@@ -350,20 +350,20 @@ CellView > .text-input.text-field {
-fx-fill: white;
}
-#rootStack.chunk-addresses .text-field .address-chunk.alternate,
-#rootStack.chunk-addresses .label .address-chunk.alternate,
-#rootStack.chunk-addresses .tree-table-view:focused .address-chunk.alternate {
+.chunk-addresses .text-field .address-chunk.alternate,
+.chunk-addresses .label .address-chunk.alternate,
+.chunk-addresses .tree-table-view:focused .address-chunk.alternate {
-fx-fill: derive(-fx-text-inner-color, 70%);
}
-#rootStack.chunk-addresses .tooltip .address-chunk.alternate {
+.chunk-addresses .tooltip .address-chunk.alternate {
-fx-fill: derive(gray, 60%);
}
-#rootStack.chunk-addresses .tree-table-view:focused .tree-table-row-cell:selected .address-chunk.alternate {
+.chunk-addresses .tree-table-view:focused .tree-table-row-cell:selected .address-chunk.alternate {
-fx-fill: derive(-fx-selection-bar-text, -15%);
}
-#rootStack.chunk-addresses .tree-table-view .tree-table-row-cell:selected .address-chunk.alternate {
+.chunk-addresses .tree-table-view .tree-table-row-cell:selected .address-chunk.alternate {
-fx-fill: derive(-fx-selection-bar-text, 60%);
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.