alter text alignment and icon sizes treewide
This commit is contained in:
parent
1fd9810b83
commit
5e3c7ffa68
5 changed files with 68 additions and 62 deletions
|
|
@ -141,6 +141,8 @@ class const App({super.key}) extends StatelessWidget {
|
||||||
),
|
),
|
||||||
home: child,
|
home: child,
|
||||||
),
|
),
|
||||||
|
child: DefaultTextHeightBehavior(
|
||||||
|
textHeightBehavior: .new(leadingDistribution: .even),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: Consumer(
|
body: Consumer(
|
||||||
builder: (_, ref, _) => switch (ref.watch(
|
builder: (_, ref, _) => switch (ref.watch(
|
||||||
|
|
@ -195,5 +197,6 @@ class const App({super.key}) extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@ class const EventPreview(final Event event, {super.key})
|
||||||
padding: .symmetric(vertical: 4),
|
padding: .symmetric(vertical: 4),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: .min,
|
mainAxisSize: .min,
|
||||||
spacing: 8,
|
spacing: 10,
|
||||||
children: [
|
children: [
|
||||||
if (event.content is MessageContent) MessageAvatar(event, height: 28),
|
if (event.content is MessageContent) MessageAvatar(event, height: 40),
|
||||||
|
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
|
||||||
|
|
@ -123,15 +123,18 @@ class const MemberList(final String roomId, {super.key})
|
||||||
members[index].stateKey!,
|
members[index].stateKey!,
|
||||||
overflow: .ellipsis,
|
overflow: .ellipsis,
|
||||||
),
|
),
|
||||||
leading: AvatarOrHash(
|
leading: Transform.translate(
|
||||||
|
offset: .new(0, 2),
|
||||||
|
child: AvatarOrHash(
|
||||||
avatarUrl,
|
avatarUrl,
|
||||||
dimension: 36,
|
dimension: 40,
|
||||||
displayName ??
|
displayName ??
|
||||||
members[index]
|
members[index]
|
||||||
.stateKey!
|
.stateKey!
|
||||||
.localpart,
|
.localpart,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
_ => throw Exception(
|
_ => throw Exception(
|
||||||
"Member content was not MembershipContent",
|
"Member content was not MembershipContent",
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ class const EventRenderer(
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: .start,
|
crossAxisAlignment: .start,
|
||||||
children: [
|
children: [
|
||||||
if (child != null) ...[
|
if (child != null)
|
||||||
if (textOnly)
|
if (textOnly)
|
||||||
child
|
child
|
||||||
else ...[
|
else ...[
|
||||||
|
|
@ -299,8 +299,8 @@ class const EventRenderer(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].map((child) => Padding(padding: .only(left: 4), child: child)),
|
].map((child) => Padding(padding: .only(left: 4), child: child)),
|
||||||
],
|
]
|
||||||
] else if (textOnly)
|
else if (textOnly)
|
||||||
Text("Unknown event type", style: errorStyle),
|
Text("Unknown event type", style: errorStyle),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ class const MessageRenderer(
|
||||||
return Row(
|
return Row(
|
||||||
crossAxisAlignment: .start,
|
crossAxisAlignment: .start,
|
||||||
mainAxisSize: .min,
|
mainAxisSize: .min,
|
||||||
spacing: 8,
|
spacing: 6,
|
||||||
children: [
|
children: [
|
||||||
if (!textOnly)
|
if (!textOnly)
|
||||||
if (isGrouped)
|
if (isGrouped)
|
||||||
|
|
@ -157,7 +157,7 @@ class const MessageRenderer(
|
||||||
MessageAvatar(event, height: 40),
|
MessageAvatar(event, height: 40),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 4,
|
spacing: 2,
|
||||||
crossAxisAlignment: .start,
|
crossAxisAlignment: .start,
|
||||||
children: [
|
children: [
|
||||||
if (!isGrouped && !textOnly)
|
if (!isGrouped && !textOnly)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue