Merge pull request #1632 from fufesou/flutter_desktop_fix_fullscreen
flutter_desktop: fix fullscreen
This commit is contained in:
commit
e166180a8d
@ -93,53 +93,53 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
|||||||
border: Border.all(color: MyTheme.color(context).border!)),
|
border: Border.all(color: MyTheme.color(context).border!)),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Theme.of(context).backgroundColor,
|
backgroundColor: Theme.of(context).backgroundColor,
|
||||||
body: DesktopTab(
|
body: Obx(() => DesktopTab(
|
||||||
controller: tabController,
|
controller: tabController,
|
||||||
showTabBar: fullscreen.isFalse,
|
showTabBar: fullscreen.isFalse,
|
||||||
onWindowCloseButton: handleWindowCloseButton,
|
onWindowCloseButton: handleWindowCloseButton,
|
||||||
tail: const AddButton().paddingOnly(left: 10),
|
tail: const AddButton().paddingOnly(left: 10),
|
||||||
pageViewBuilder: (pageView) {
|
pageViewBuilder: (pageView) {
|
||||||
WindowController.fromWindowId(windowId())
|
WindowController.fromWindowId(windowId())
|
||||||
.setFullscreen(fullscreen.isTrue);
|
.setFullscreen(fullscreen.isTrue);
|
||||||
return pageView;
|
return pageView;
|
||||||
},
|
},
|
||||||
tabBuilder: (key, icon, label, themeConf) => Obx(() {
|
tabBuilder: (key, icon, label, themeConf) => Obx(() {
|
||||||
final connectionType = ConnectionTypeState.find(key);
|
final connectionType = ConnectionTypeState.find(key);
|
||||||
if (!connectionType.isValid()) {
|
if (!connectionType.isValid()) {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
icon,
|
icon,
|
||||||
label,
|
label,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final msgDirect = translate(
|
final msgDirect = translate(
|
||||||
connectionType.direct.value == ConnectionType.strDirect
|
connectionType.direct.value == ConnectionType.strDirect
|
||||||
? 'Direct Connection'
|
? 'Direct Connection'
|
||||||
: 'Relay Connection');
|
: 'Relay Connection');
|
||||||
final msgSecure = translate(
|
final msgSecure = translate(
|
||||||
connectionType.secure.value == ConnectionType.strSecure
|
connectionType.secure.value == ConnectionType.strSecure
|
||||||
? 'Secure Connection'
|
? 'Secure Connection'
|
||||||
: 'Insecure Connection');
|
: 'Insecure Connection');
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
icon,
|
icon,
|
||||||
Tooltip(
|
Tooltip(
|
||||||
message: '$msgDirect\n$msgSecure',
|
message: '$msgDirect\n$msgSecure',
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
'assets/${connectionType.secure.value}${connectionType.direct.value}.svg',
|
'assets/${connectionType.secure.value}${connectionType.direct.value}.svg',
|
||||||
width: themeConf.iconSize,
|
width: themeConf.iconSize,
|
||||||
height: themeConf.iconSize,
|
height: themeConf.iconSize,
|
||||||
).paddingOnly(right: 5),
|
).paddingOnly(right: 5),
|
||||||
),
|
),
|
||||||
label,
|
label,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
)),
|
))),
|
||||||
);
|
);
|
||||||
return Platform.isMacOS
|
return Platform.isMacOS
|
||||||
? tabWidget
|
? tabWidget
|
||||||
|
Loading…
x
Reference in New Issue
Block a user