chore: Follow up fixes new login design

This commit is contained in:
Christian Pauly 2022-04-23 10:57:12 +02:00
parent 1a2eb272fa
commit 0f1bb4dccf
2 changed files with 51 additions and 44 deletions

View File

@ -36,16 +36,16 @@ class ConnectPageView extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: Center( child: Center(
child: Material( child: Stack(
children: [
Material(
borderRadius: BorderRadius.circular(64), borderRadius: BorderRadius.circular(64),
elevation: 10, elevation: 10,
color: Colors.transparent, color: Colors.transparent,
clipBehavior: Clip.hardEdge,
child: CircleAvatar( child: CircleAvatar(
radius: 64, radius: 64,
backgroundColor: Colors.white.withAlpha(200), backgroundColor: Colors.white.withAlpha(200),
child: Stack(
children: [
Center(
child: avatar == null child: avatar == null
? const Icon( ? const Icon(
Icons.person_outlined, Icons.person_outlined,
@ -60,10 +60,16 @@ class ConnectPageView extends StatelessWidget {
return const CircularProgressIndicator return const CircularProgressIndicator
.adaptive(); .adaptive();
} }
return Image.memory(bytes); return Image.memory(
bytes,
fit: BoxFit.cover,
width: 128,
height: 128,
);
}, },
), ),
), ),
),
Positioned( Positioned(
bottom: 0, bottom: 0,
right: 0, right: 0,
@ -79,8 +85,6 @@ class ConnectPageView extends StatelessWidget {
), ),
), ),
), ),
),
),
Padding( Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: TextField( child: TextField(

View File

@ -34,10 +34,12 @@ class HomeserverPickerController extends State<HomeserverPicker> {
void _updateFocus() { void _updateFocus() {
if (benchmarkResults == null) _loadHomeserverList(); if (benchmarkResults == null) _loadHomeserverList();
if (homeserverFocusNode.hasFocus) {
setState(() { setState(() {
displayServerList = homeserverFocusNode.hasFocus; displayServerList = true;
}); });
} }
}
void showServerInfo(HomeserverBenchmarkResult server) => showModalBottomSheet( void showServerInfo(HomeserverBenchmarkResult server) => showModalBottomSheet(
context: context, context: context,
@ -76,6 +78,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
homeserverController.text = server; homeserverController.text = server;
searchTerm = ''; searchTerm = '';
homeserverFocusNode.unfocus(); homeserverFocusNode.unfocus();
displayServerList = false;
}); });
/// Starts an analysis of the given homeserver. It uses the current domain and /// Starts an analysis of the given homeserver. It uses the current domain and