fix seed page on desktop (#2752)
What changed, and why it matters
This commit adjusts how many seed-phrase word tiles are shown per row on desktop screens. It adds an upper limit of four tiles per row so the seed-phrase display does not stretch too wide on large monitors. There is no security change here; it is purely a user-interface layout fix.
No security action needed. Treat as a normal UI fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies lib/src/widgets/seedphrase_grid_widget.dart. Previously the grid computed crossAxisCount from screen width and only enforced a minimum of 1. The patch adds minTiles=1 and maxTiles=4, then clamps crossAxisCount to that range. This prevents an excessively large number of columns on wide desktop windows. No logic handling the seed phrase data, storage, or display security is altered.
Changed components
lib/src/widgets/seedphrase_grid_widget.dartInspect captured patch +6 / −4
diff --git a/lib/src/widgets/seedphrase_grid_widget.dart b/lib/src/widgets/seedphrase_grid_widget.dart
index df8535f5..0d457a09 100644
--- a/lib/src/widgets/seedphrase_grid_widget.dart
+++ b/lib/src/widgets/seedphrase_grid_widget.dart
@@ -12,17 +12,19 @@ class SeedPhraseGridWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
-
+ int minTiles = 1;
+ int maxTiles = 4;
double desiredTileWidth = 120;
double spacing = 4;
double padding = 4;
double screenWidth = MediaQuery.of(context).size.width;
int crossAxisCount =
- ((screenWidth + spacing - (2 * padding)) / (desiredTileWidth + spacing))
- .floor();
+ ((screenWidth + spacing - (2 * padding)) / (desiredTileWidth + spacing)).floor();
+
- if (crossAxisCount < 1) crossAxisCount = 1;
+ if (crossAxisCount > maxTiles) crossAxisCount = maxTiles;
+ if (crossAxisCount < minTiles) crossAxisCount = minTiles;
return GridView.builder(
itemCount: list.length,
Why this scored 18/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.