chore: Adjust material dialog button design

This commit is contained in:
krille-chan 2025-09-16 12:09:50 +02:00
commit 6370c486a0
No known key found for this signature in database
4 changed files with 48 additions and 15 deletions

View file

@ -74,6 +74,19 @@ class UserDialog extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Center(
child: Avatar(
mxContent: avatar,
name: displayname,
size: Avatar.defaultSize * 2,
onTap: avatar != null
? () => showDialog(
context: context,
builder: (_) => MxcImageViewer(avatar),
)
: null,
),
),
HoverBuilder(
builder: (context, hovered) => StatefulBuilder(
builder: (context, setState) => MouseRegion(
@ -122,19 +135,6 @@ class UserDialog extends StatelessWidget {
),
),
),
Center(
child: Avatar(
mxContent: avatar,
name: displayname,
size: Avatar.defaultSize * 2,
onTap: avatar != null
? () => showDialog(
context: context,
builder: (_) => MxcImageViewer(avatar),
)
: null,
),
),
if (presenceText != null)
Text(
presenceText,
@ -165,6 +165,7 @@ class UserDialog extends StatelessWidget {
actions: [
if (client.userID != profile.userId) ...[
AdaptiveDialogAction(
borderRadius: AdaptiveDialogAction.topRadius,
bigButtons: true,
onPressed: () async {
final router = GoRouter.of(context);
@ -185,6 +186,7 @@ class UserDialog extends StatelessWidget {
),
AdaptiveDialogAction(
bigButtons: true,
borderRadius: AdaptiveDialogAction.centerRadius,
onPressed: () {
final router = GoRouter.of(context);
Navigator.of(context).pop();
@ -201,6 +203,7 @@ class UserDialog extends StatelessWidget {
],
AdaptiveDialogAction(
bigButtons: true,
borderRadius: AdaptiveDialogAction.bottomRadius,
onPressed: Navigator.of(context).pop,
child: Text(L10n.of(context).close),
),