🐛 Fix wrong line height

This commit is contained in:
LittleSheep 2024-12-14 15:24:11 +08:00
parent 80a66136ce
commit df18370bde

View File

@ -113,17 +113,17 @@ class _LinkPreviewEntry extends StatelessWidget {
children: [ children: [
SizedBox( SizedBox(
height: 24, height: 24,
child: ((meta.title?.length ?? 0) > 40) child: ((meta.title?.length ?? 0) > 32)
? Marquee( ? Marquee(
text: meta.title ?? 'unknown'.tr(), text: meta.title ?? 'unknown'.tr(),
style: TextStyle(fontSize: 17, height: 1), style: TextStyle(fontSize: 17),
scrollAxis: Axis.horizontal, scrollAxis: Axis.horizontal,
showFadingOnlyWhenScrolling: true, showFadingOnlyWhenScrolling: true,
pauseAfterRound: const Duration(seconds: 3), pauseAfterRound: const Duration(seconds: 3),
) )
: Text( : Text(
meta.title ?? 'unknown'.tr(), meta.title ?? 'unknown'.tr(),
style: TextStyle(fontSize: 17, height: 1), style: TextStyle(fontSize: 17),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),