From 4cc82042c0b6456ea13011023b23f07acbaa28c3 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Fri, 24 Nov 2023 17:09:52 -0500 Subject: [PATCH] Add tooltip to chat reply box --- .../channel/chat/widgets/chat_bottom_bar.dart | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/screens/channel/chat/widgets/chat_bottom_bar.dart b/lib/screens/channel/chat/widgets/chat_bottom_bar.dart index 12ce5a7e..f6a93741 100644 --- a/lib/screens/channel/chat/widgets/chat_bottom_bar.dart +++ b/lib/screens/channel/chat/widgets/chat_bottom_bar.dart @@ -66,23 +66,27 @@ class ChatBottomBar extends StatelessWidget { ListTile( contentPadding: const EdgeInsets.only(left: 16), leading: const Icon(Icons.reply), - title: Text.rich( - TextSpan( - children: chatStore.replyingToMessage!.generateSpan( - context, - assetsStore: chatStore.assetsStore, - emoteScale: chatStore.settings.emoteScale, - badgeScale: chatStore.settings.badgeScale, - useReadableColors: chatStore.settings.useReadableColors, - launchExternal: chatStore.settings.launchUrlExternal, - timestamp: chatStore.settings.timestampType, + title: Tooltip( + message: chatStore.replyingToMessage!.message, + preferBelow: false, + child: Text.rich( + TextSpan( + children: chatStore.replyingToMessage!.generateSpan( + context, + assetsStore: chatStore.assetsStore, + emoteScale: chatStore.settings.emoteScale, + badgeScale: chatStore.settings.badgeScale, + useReadableColors: chatStore.settings.useReadableColors, + launchExternal: chatStore.settings.launchUrlExternal, + timestamp: chatStore.settings.timestampType, + ), ), + maxLines: 3, + overflow: TextOverflow.ellipsis, + style: DefaultTextStyle.of(context) + .style + .copyWith(fontSize: chatStore.settings.fontSize), ), - maxLines: 3, - overflow: TextOverflow.ellipsis, - style: DefaultTextStyle.of(context) - .style - .copyWith(fontSize: chatStore.settings.fontSize), ), trailing: IconButton( tooltip: 'Cancel reply',