Merge pull request #3766 from 21pages/fix

fix home page tabbar label language cannot be changed
This commit is contained in:
RustDesk 2023-03-24 18:17:50 +08:00 committed by GitHub
commit 9ec0b4be56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ class DesktopTabPage extends StatefulWidget {
DesktopTabController tabController = Get.find();
tabController.add(TabInfo(
key: kTabLabelSettingPage,
label: translate(kTabLabelSettingPage),
label: kTabLabelSettingPage,
selectedIcon: Icons.build_sharp,
unselectedIcon: Icons.build_outlined,
page: DesktopSettingPage(
@ -46,7 +46,7 @@ class _DesktopTabPageState extends State<DesktopTabPage> {
RemoteCountState.init();
tabController.add(TabInfo(
key: kTabLabelHomePage,
label: translate(kTabLabelHomePage),
label: kTabLabelHomePage,
selectedIcon: Icons.home_sharp,
unselectedIcon: Icons.home_outlined,
closable: false,

View File

@ -869,7 +869,7 @@ class _TabState extends State<_Tab> with RestorationMixin {
return ConstrainedBox(
constraints: BoxConstraints(maxWidth: widget.maxLabelWidth ?? 200),
child: Text(
widget.label.value,
translate(widget.label.value),
textAlign: TextAlign.center,
style: TextStyle(
color: isSelected