From 5be286e170182af5839df8db7ad614c265302633 Mon Sep 17 00:00:00 2001 From: Geoffrey Bonneville Date: Wed, 18 Dec 2024 19:11:24 +0100 Subject: [PATCH] Limit add torrent dialog width to 480px --- app/lib/dialogs/add_torrent.dart | 53 +++++++++++++++++--------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/app/lib/dialogs/add_torrent.dart b/app/lib/dialogs/add_torrent.dart index 8fe2725..4e8980b 100644 --- a/app/lib/dialogs/add_torrent.dart +++ b/app/lib/dialogs/add_torrent.dart @@ -183,31 +183,34 @@ class _AddTorrentDialogState extends State { return AlertDialog( title: const Text('Add a torrent'), - content: Form( - key: _formKey, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - _buildTorrentLinkInput(), - _buildInputsSeparator(), - _buildFileInput(context), - if (!Platform.isAndroid) const SizedBox(height: 16), - if (!Platform.isAndroid) - Row( - children: [ - const Text('Destination:'), - const SizedBox(width: 16), - Expanded( - child: TextButton( - onPressed: _handlePickDirectory, - child: Text( - downloadDir, - overflow: TextOverflow.ellipsis, - )), - ) - ], - ) - ], + content: SizedBox( + width: 480, + child: Form( + key: _formKey, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + _buildTorrentLinkInput(), + _buildInputsSeparator(), + _buildFileInput(context), + if (!Platform.isAndroid) const SizedBox(height: 16), + if (!Platform.isAndroid) + Row( + children: [ + const Text('Destination:'), + const SizedBox(width: 16), + Expanded( + child: TextButton( + onPressed: _handlePickDirectory, + child: Text( + downloadDir, + overflow: TextOverflow.ellipsis, + )), + ) + ], + ) + ], + ), ), ), actions: [