style: Bootstrap design adjustments

This commit is contained in:
Christian Pauly 2023-02-17 09:34:23 +01:00
parent e08f601bfd
commit 3c17d812b3

View File

@ -125,9 +125,12 @@ class BootstrapDialogState extends State<BootstrapDialog> {
children: [ children: [
ListTile( ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 8.0), contentPadding: const EdgeInsets.symmetric(horizontal: 8.0),
trailing: Icon( trailing: CircleAvatar(
Icons.info_outlined, backgroundColor: Colors.transparent,
color: Theme.of(context).colorScheme.primary, child: Icon(
Icons.info_outlined,
color: Theme.of(context).colorScheme.primary,
),
), ),
subtitle: Text(L10n.of(context)!.chatBackupDescription), subtitle: Text(L10n.of(context)!.chatBackupDescription),
), ),
@ -136,11 +139,15 @@ class BootstrapDialogState extends State<BootstrapDialog> {
thickness: 1, thickness: 1,
), ),
TextField( TextField(
minLines: 4, minLines: 2,
maxLines: 4, maxLines: 4,
readOnly: true, readOnly: true,
style: const TextStyle(fontFamily: 'monospace'), style: const TextStyle(fontFamily: 'RobotoMono'),
controller: TextEditingController(text: key), controller: TextEditingController(text: key),
decoration: const InputDecoration(
contentPadding: EdgeInsets.all(16),
suffixIcon: Icon(Icons.key_outlined),
),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
if (_supportsSecureStorage) if (_supportsSecureStorage)
@ -234,7 +241,7 @@ class BootstrapDialogState extends State<BootstrapDialog> {
icon: const Icon(Icons.close), icon: const Icon(Icons.close),
onPressed: Navigator.of(context).pop, onPressed: Navigator.of(context).pop,
), ),
title: Text(L10n.of(context)!.unlockOldMessages), title: Text(L10n.of(context)!.chatBackup),
), ),
body: Center( body: Center(
child: ConstrainedBox( child: ConstrainedBox(
@ -255,7 +262,7 @@ class BootstrapDialogState extends State<BootstrapDialog> {
), ),
const Divider(height: 32), const Divider(height: 32),
TextField( TextField(
minLines: 2, minLines: 1,
maxLines: 2, maxLines: 2,
autocorrect: false, autocorrect: false,
readOnly: _recoveryKeyInputLoading, readOnly: _recoveryKeyInputLoading,
@ -263,15 +270,15 @@ class BootstrapDialogState extends State<BootstrapDialog> {
? null ? null
: [AutofillHints.password], : [AutofillHints.password],
controller: _recoveryKeyTextEditingController, controller: _recoveryKeyTextEditingController,
style: const TextStyle(fontFamily: 'monospace'), style: const TextStyle(fontFamily: 'RobotoMono'),
decoration: InputDecoration( decoration: InputDecoration(
hintText: 'Abc123 Def456', contentPadding: const EdgeInsets.all(16),
labelStyle: TextStyle( hintStyle: TextStyle(
fontFamily: Theme.of(context) fontFamily: Theme.of(context)
.textTheme .textTheme
.bodyLarge .bodyLarge
?.fontFamily), ?.fontFamily),
labelText: L10n.of(context)!.recoveryKey, hintText: L10n.of(context)!.recoveryKey,
errorText: _recoveryKeyInputError, errorText: _recoveryKeyInputError,
), ),
), ),