From b76453483ed3f82c4d08641ac7f6045e83c65b99 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Fri, 8 Jul 2022 10:19:07 +0200 Subject: [PATCH] chore: Pinned events design --- lib/pages/chat/pinned_events.dart | 14 +++++++------- lib/pages/chat/tombstone_display.dart | 9 ++++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/pages/chat/pinned_events.dart b/lib/pages/chat/pinned_events.dart index 856d95ac..02e72c8f 100644 --- a/lib/pages/chat/pinned_events.dart +++ b/lib/pages/chat/pinned_events.dart @@ -66,9 +66,7 @@ class PinnedEvents extends StatelessWidget { final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor; return Material( - color: Theme.of(context).appBarTheme.backgroundColor, - elevation: Theme.of(context).appBarTheme.elevation ?? 10, - shadowColor: Theme.of(context).appBarTheme.shadowColor, + color: Theme.of(context).colorScheme.surfaceVariant, child: InkWell( onTap: () => _displayPinnedEventsDialog( context, @@ -79,6 +77,7 @@ class PinnedEvents extends StatelessWidget { IconButton( splashRadius: 20, iconSize: 20, + color: Theme.of(context).colorScheme.onSurfaceVariant, icon: const Icon(Icons.push_pin), tooltip: L10n.of(context)!.unpin, onPressed: controller.room @@ -106,6 +105,9 @@ class PinnedEvents extends StatelessWidget { ), maxLines: 2, textStyle: TextStyle( + color: Theme.of(context) + .colorScheme + .onSurfaceVariant, overflow: TextOverflow.ellipsis, fontSize: fontSize, decoration: event.redacted @@ -114,10 +116,8 @@ class PinnedEvents extends StatelessWidget { ), linkStyle: TextStyle( color: Theme.of(context) - .textTheme - .bodyText1 - ?.color - ?.withAlpha(150), + .colorScheme + .onSurfaceVariant, fontSize: fontSize, decoration: TextDecoration.underline, ), diff --git a/lib/pages/chat/tombstone_display.dart b/lib/pages/chat/tombstone_display.dart index 4bd0821d..ad8b971b 100644 --- a/lib/pages/chat/tombstone_display.dart +++ b/lib/pages/chat/tombstone_display.dart @@ -17,12 +17,12 @@ class TombstoneDisplay extends StatelessWidget { return SizedBox( height: 72, child: Material( - color: Theme.of(context).secondaryHeaderColor, + color: Theme.of(context).colorScheme.surfaceVariant, elevation: 1, child: ListTile( leading: CircleAvatar( - foregroundColor: Theme.of(context).colorScheme.secondary, - backgroundColor: Theme.of(context).backgroundColor, + foregroundColor: Theme.of(context).colorScheme.onSecondary, + backgroundColor: Theme.of(context).colorScheme.secondary, child: const Icon(Icons.upgrade_outlined), ), title: Text( @@ -32,6 +32,9 @@ class TombstoneDisplay extends StatelessWidget { .body, maxLines: 1, overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), ), subtitle: Text(L10n.of(context)!.goToTheNewRoom), onTap: controller.goToNewRoomAction,