chore: set max lines for word card phonetic transcription (#5005)

This commit is contained in:
ggurdin 2025-12-31 10:41:35 -05:00 committed by GitHub
parent e316517c1e
commit cb141a7c4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -19,6 +19,7 @@ class PhoneticTranscriptionWidget extends StatefulWidget {
final TextStyle? style;
final double? iconSize;
final Color? iconColor;
final int? maxLines;
final VoidCallback? onTranscriptionFetched;
@ -29,6 +30,7 @@ class PhoneticTranscriptionWidget extends StatefulWidget {
this.style,
this.iconSize,
this.iconColor,
this.maxLines,
this.onTranscriptionFetched,
});
@ -119,6 +121,8 @@ class _PhoneticTranscriptionWidgetState
textScaler: TextScaler.noScaling,
style: widget.style ??
Theme.of(context).textTheme.bodyMedium,
maxLines: widget.maxLines,
overflow: TextOverflow.ellipsis,
),
),
Tooltip(

View file

@ -144,6 +144,7 @@ class WordZoomWidget extends StatelessWidget {
LanguageModel.unknown,
style: const TextStyle(fontSize: 14.0),
iconSize: 24.0,
maxLines: 2,
)
: WordAudioButton(
text: token.content,