refactor DesktopTab impl for file_manager_tab_page.dart

This commit is contained in:
csf
2022-08-24 21:09:18 +08:00
parent cc3c725f38
commit 4f4ac67228
3 changed files with 55 additions and 74 deletions

View File

@@ -35,7 +35,6 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
label: params['id'],
selectedIcon: selectedIcon,
unselectedIcon: unselectedIcon,
closable: false,
page: RemotePage(
id: params['id'],
tabBarHeight:
@@ -118,23 +117,3 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
return widget.params["windowId"];
}
}
class AddButton extends StatelessWidget {
late final TarBarTheme theme;
AddButton({
Key? key,
required this.theme,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ActionIcon(
message: 'New Connection',
icon: IconFont.add,
theme: theme,
onTap: () =>
rustDeskWinManager.call(WindowType.Main, "main_window_on_top", ""),
is_close: false);
}
}