diff --git a/lib/widgets/common/action_delegates/create_album_dialog.dart b/lib/widgets/common/action_delegates/create_album_dialog.dart index 51baf33a5..46a440077 100644 --- a/lib/widgets/common/action_delegates/create_album_dialog.dart +++ b/lib/widgets/common/action_delegates/create_album_dialog.dart @@ -16,6 +16,8 @@ class _CreateAlbumDialogState extends State { Set _allVolumes; StorageVolume _primaryVolume, _selectedVolume; + static const EdgeInsets hPadding = EdgeInsets.symmetric(horizontal: 24); + @override void initState() { super.initState(); @@ -35,56 +37,55 @@ class _CreateAlbumDialogState extends State { Widget build(BuildContext context) { return AlertDialog( title: Text('New Album'), - content: Column( - mainAxisSize: MainAxisSize.min, + content: ListView( + shrinkWrap: true, children: [ if (_allVolumes.length > 1) ...[ - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text('Storage:'), - SizedBox(width: 8), - Expanded( - child: DropdownButton( - isExpanded: true, - items: _allVolumes - .map((volume) => DropdownMenuItem( - value: volume, - child: Text( - volume.description, - softWrap: false, - overflow: TextOverflow.fade, - maxLines: 1, - ), - )) - .toList(), - value: _selectedVolume, - onChanged: (volume) { - _selectedVolume = volume; - _checkAlbumExists(); - setState(() {}); - }, - ), - ), - ], + Padding( + padding: hPadding, + child: Text('Storage:'), ), - SizedBox(height: 16), - ], - ValueListenableBuilder( - valueListenable: _existsNotifier, - builder: (context, exists, child) { - return TextField( - controller: _nameController, - decoration: InputDecoration( - helperText: exists ? 'Album already exists' : '', + ..._allVolumes.map((volume) => RadioListTile( + value: volume, + groupValue: _selectedVolume, + onChanged: (volume) { + _selectedVolume = volume; + _checkAlbumExists(); + setState(() {}); + }, + title: Text( + volume.description, + softWrap: false, + overflow: TextOverflow.fade, + maxLines: 1, ), - onChanged: (_) => _checkAlbumExists(), - onSubmitted: (_) => _submit(context), - ); - }), + subtitle: Text( + volume.path, + softWrap: false, + overflow: TextOverflow.fade, + maxLines: 1, + ), + )), + SizedBox(height: 8), + ], + Padding( + padding: hPadding, + child: ValueListenableBuilder( + valueListenable: _existsNotifier, + builder: (context, exists, child) { + return TextField( + controller: _nameController, + decoration: InputDecoration( + helperText: exists ? 'Album already exists' : '', + ), + onChanged: (_) => _checkAlbumExists(), + onSubmitted: (_) => _submit(context), + ); + }), + ), ], ), - contentPadding: EdgeInsets.fromLTRB(24, 20, 24, 0), + contentPadding: EdgeInsets.only(top: 20), actions: [ FlatButton( onPressed: () => Navigator.pop(context),