alter text alignment and icon sizes treewide

This commit is contained in:
Henry Hiles 2026-10-04 11:16:39 -04:00
commit 5e3c7ffa68
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
5 changed files with 68 additions and 62 deletions

View file

@ -141,57 +141,60 @@ class const App({super.key}) extends StatelessWidget {
), ),
home: child, home: child,
), ),
child: Scaffold( child: DefaultTextHeightBehavior(
body: Consumer( textHeightBehavior: .new(leadingDistribution: .even),
builder: (_, ref, _) => switch (ref.watch( child: Scaffold(
MultiProviderController.provider( body: Consumer(
.new([ builder: (_, ref, _) => switch (ref.watch(
GomuksListenerController.provider, MultiProviderController.provider(
NotificationController.provider, .new([
UnifiedPushController.provider, GomuksListenerController.provider,
MemberListOpenedController.provider, NotificationController.provider,
KeyController.provider(KeyController.roomKey), UnifiedPushController.provider,
KeyController.provider(KeyController.spaceKey), MemberListOpenedController.provider,
]), KeyController.provider(KeyController.roomKey),
), KeyController.provider(KeyController.spaceKey),
)) {
AsyncData(value: _) || AsyncLoading(value: _?) => Consumer(
builder: (_, ref, _) {
final clientState = ref.watch(ClientStateController.provider);
if (clientState == null || !clientState.isInitialized) {
return Loading();
}
if (!clientState.isLoggedIn) {
return SelectServerPage();
} else if (!clientState.isVerified) {
return VerifyPage();
} else {
return ChatPage();
}
},
),
AsyncLoading _ => Scaffold(
appBar: Appbar(
actions: .new([
IconButton(
onPressed: () => showDialog(
context: context,
builder: (_) => SettingsPage(),
),
icon: Icon(Icons.settings),
),
]), ]),
), ),
body: Loading(), )) {
), AsyncData(value: _) || AsyncLoading(value: _?) => Consumer(
AsyncError(:final error, :final stackTrace) => ErrorDialog( builder: (_, ref, _) {
error, final clientState = ref.watch(ClientStateController.provider);
stackTrace,
), if (clientState == null || !clientState.isInitialized) {
}, return Loading();
}
if (!clientState.isLoggedIn) {
return SelectServerPage();
} else if (!clientState.isVerified) {
return VerifyPage();
} else {
return ChatPage();
}
},
),
AsyncLoading _ => Scaffold(
appBar: Appbar(
actions: .new([
IconButton(
onPressed: () => showDialog(
context: context,
builder: (_) => SettingsPage(),
),
icon: Icon(Icons.settings),
),
]),
),
body: Loading(),
),
AsyncError(:final error, :final stackTrace) => ErrorDialog(
error,
stackTrace,
),
},
),
), ),
), ),
), ),

View file

@ -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(

View file

@ -123,13 +123,16 @@ class const MemberList(final String roomId, {super.key})
members[index].stateKey!, members[index].stateKey!,
overflow: .ellipsis, overflow: .ellipsis,
), ),
leading: AvatarOrHash( leading: Transform.translate(
avatarUrl, offset: .new(0, 2),
dimension: 36, child: AvatarOrHash(
displayName ?? avatarUrl,
members[index] dimension: 40,
.stateKey! displayName ??
.localpart, members[index]
.stateKey!
.localpart,
),
), ),
), ),
_ => throw Exception( _ => throw Exception(

View file

@ -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),
], ],
); );

View file

@ -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)