fix(ui): resolve desktop overflow in menu
What changed, and why it matters
This commit fixes a visual layout problem in the desktop version of Stack Wallet. It prevents menus and dialog boxes from extending beyond the screen when there are too many items, by making them scrollable and limiting their maximum height. There is no security issue here.
No security action needed. Treat as a normal UI bug fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch wraps desktop UI widgets in SingleChildScrollView and constrains dialog maxHeight using MediaQuery.sizeOf(context).height - 64. It also replaces a Spacer with conditional spacing and adjusts mainAxisSize/crossAxisAlignment. These are purely cosmetic/responsive layout changes to resolve overflow rendering errors on desktop.
Changed components
lib/pages_desktop_specific/desktop_menu.dartlib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dartInspect captured patch +23 / −7
diff --git a/lib/pages_desktop_specific/desktop_menu.dart b/lib/pages_desktop_specific/desktop_menu.dart
index c0cbf10..4b95064 100644
--- a/lib/pages_desktop_specific/desktop_menu.dart
+++ b/lib/pages_desktop_specific/desktop_menu.dart
@@ -175,7 +175,8 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
? _width -
32 // 16 padding on either side
: _width - 16, // 8 padding on either side
- child: Column(
+ child: SingleChildScrollView(
+ child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
DesktopMenuItem(
@@ -271,8 +272,8 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
controller: controllers[7],
isExpandedInitially: !_isMinimized,
),
- const Spacer(),
- if (!Platform.isIOS)
+ if (!Platform.isIOS) ...[
+ const SizedBox(height: 16),
DesktopMenuItem(
key: const ValueKey('exit'),
duration: duration,
@@ -294,8 +295,10 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
controller: controllers[8],
isExpandedInitially: !_isMinimized,
),
+ ],
],
),
+ ),
),
),
Row(
diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart
index 2a635e5..57c5a11 100644
--- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart
+++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart
@@ -331,10 +331,13 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
pWallets.select((value) => value.getWallet(widget.walletId)),
);
+ final maxDialogHeight = MediaQuery.sizeOf(context).height - 64;
+
return DesktopDialog(
- maxHeight: double.infinity,
+ maxHeight: maxDialogHeight,
child: Column(
- mainAxisSize: MainAxisSize.min,
+ mainAxisSize: MainAxisSize.max,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -350,7 +353,13 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
],
),
- ...widget.options.map((option) {
+ Expanded(
+ child: SingleChildScrollView(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ ...widget.options.map((option) {
switch (option.$1) {
case WalletFeature.buy:
// Buy has a special icon
@@ -527,7 +536,11 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
}
}),
- const SizedBox(height: 28),
+ const SizedBox(height: 28),
+ ],
+ ),
+ ),
+ ),
],
),
);
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.