fix tab lable translation (#13240)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2025-10-21 15:39:52 +08:00
committed by GitHub
parent c9940957f0
commit a77752c4cb

View File

@@ -1080,11 +1080,12 @@ class _TabState extends State<_Tab> with RestorationMixin {
return ConstrainedBox(
constraints: BoxConstraints(maxWidth: widget.maxLabelWidth ?? 200),
child: Tooltip(
message: widget.tabType == DesktopTabType.main
? ''
: translate(widget.label.value),
message:
widget.tabType == DesktopTabType.main ? '' : widget.label.value,
child: Text(
translate(widget.label.value),
widget.tabType == DesktopTabType.main
? translate(widget.label.value)
: widget.label.value,
textAlign: TextAlign.center,
style: TextStyle(
color: isSelected