diff --git a/flutter/lib/desktop/pages/connection_tab_page.dart b/flutter/lib/desktop/pages/connection_tab_page.dart index cf221c4d0..66f342919 100644 --- a/flutter/lib/desktop/pages/connection_tab_page.dart +++ b/flutter/lib/desktop/pages/connection_tab_page.dart @@ -94,14 +94,20 @@ class _ConnectionTabPageState extends State { border: Border.all(color: MyTheme.color(context).border!)), child: Scaffold( backgroundColor: MyTheme.color(context).bg, - body: DesktopTab( - controller: tabController, - theme: theme, - isMainWindow: false, - tail: AddButton( - theme: theme, - ).paddingOnly(left: 10), - )), + body: Obx(() => DesktopTab( + controller: tabController, + theme: theme, + isMainWindow: false, + showTabBar: _fullscreenID.value.isEmpty, + tail: AddButton( + theme: theme, + ).paddingOnly(left: 10), + pageViewBuilder: (pageView) { + WindowController.fromWindowId(windowId()) + .setFullscreen(_fullscreenID.value.isNotEmpty); + return pageView; + }, + ))), ), ); } diff --git a/flutter/lib/desktop/widgets/tabbar_widget.dart b/flutter/lib/desktop/widgets/tabbar_widget.dart index 8aa8377c6..afac932ec 100644 --- a/flutter/lib/desktop/widgets/tabbar_widget.dart +++ b/flutter/lib/desktop/widgets/tabbar_widget.dart @@ -118,6 +118,7 @@ class DesktopTab extends StatelessWidget { final Function(String)? onTabClose; final TarBarTheme theme; final bool isMainWindow; + final bool showTabBar; final bool showLogo; final bool showTitle; final bool showMinimize; @@ -134,6 +135,7 @@ class DesktopTab extends StatelessWidget { required this.isMainWindow, this.theme = const TarBarTheme.light(), this.onTabClose, + this.showTabBar = true, this.showLogo = true, this.showTitle = true, this.showMinimize = true, @@ -145,21 +147,23 @@ class DesktopTab extends StatelessWidget { @override Widget build(BuildContext context) { return Column(children: [ - Container( - height: _kTabBarHeight, - child: Column( - children: [ - Container( - height: _kTabBarHeight - 1, - child: _buildBar(), + Offstage( + offstage: !showTabBar, + child: Container( + height: _kTabBarHeight, + child: Column( + children: [ + Container( + height: _kTabBarHeight - 1, + child: _buildBar(), + ), + Divider( + height: 1, + thickness: 1, + ), + ], ), - Divider( - height: 1, - thickness: 1, - ), - ], - ), - ), + )), Expanded( child: pageViewBuilder != null ? pageViewBuilder!(_buildPageView())