chore: Pinned events design

This commit is contained in:
Christian Pauly 2022-07-08 10:19:07 +02:00
parent 8d0a0d43be
commit b76453483e
2 changed files with 13 additions and 10 deletions

View File

@ -66,9 +66,7 @@ class PinnedEvents extends StatelessWidget {
final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor; final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor;
return Material( return Material(
color: Theme.of(context).appBarTheme.backgroundColor, color: Theme.of(context).colorScheme.surfaceVariant,
elevation: Theme.of(context).appBarTheme.elevation ?? 10,
shadowColor: Theme.of(context).appBarTheme.shadowColor,
child: InkWell( child: InkWell(
onTap: () => _displayPinnedEventsDialog( onTap: () => _displayPinnedEventsDialog(
context, context,
@ -79,6 +77,7 @@ class PinnedEvents extends StatelessWidget {
IconButton( IconButton(
splashRadius: 20, splashRadius: 20,
iconSize: 20, iconSize: 20,
color: Theme.of(context).colorScheme.onSurfaceVariant,
icon: const Icon(Icons.push_pin), icon: const Icon(Icons.push_pin),
tooltip: L10n.of(context)!.unpin, tooltip: L10n.of(context)!.unpin,
onPressed: controller.room onPressed: controller.room
@ -106,6 +105,9 @@ class PinnedEvents extends StatelessWidget {
), ),
maxLines: 2, maxLines: 2,
textStyle: TextStyle( textStyle: TextStyle(
color: Theme.of(context)
.colorScheme
.onSurfaceVariant,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
fontSize: fontSize, fontSize: fontSize,
decoration: event.redacted decoration: event.redacted
@ -114,10 +116,8 @@ class PinnedEvents extends StatelessWidget {
), ),
linkStyle: TextStyle( linkStyle: TextStyle(
color: Theme.of(context) color: Theme.of(context)
.textTheme .colorScheme
.bodyText1 .onSurfaceVariant,
?.color
?.withAlpha(150),
fontSize: fontSize, fontSize: fontSize,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
), ),

View File

@ -17,12 +17,12 @@ class TombstoneDisplay extends StatelessWidget {
return SizedBox( return SizedBox(
height: 72, height: 72,
child: Material( child: Material(
color: Theme.of(context).secondaryHeaderColor, color: Theme.of(context).colorScheme.surfaceVariant,
elevation: 1, elevation: 1,
child: ListTile( child: ListTile(
leading: CircleAvatar( leading: CircleAvatar(
foregroundColor: Theme.of(context).colorScheme.secondary, foregroundColor: Theme.of(context).colorScheme.onSecondary,
backgroundColor: Theme.of(context).backgroundColor, backgroundColor: Theme.of(context).colorScheme.secondary,
child: const Icon(Icons.upgrade_outlined), child: const Icon(Icons.upgrade_outlined),
), ),
title: Text( title: Text(
@ -32,6 +32,9 @@ class TombstoneDisplay extends StatelessWidget {
.body, .body,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
), ),
subtitle: Text(L10n.of(context)!.goToTheNewRoom), subtitle: Text(L10n.of(context)!.goToTheNewRoom),
onTap: controller.goToNewRoomAction, onTap: controller.goToNewRoomAction,