mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
opt: use WindowOption to initialize screen
Signed-off-by: Kingtous <kingtous@qq.com>
This commit is contained in:
@@ -117,12 +117,23 @@ void runFileTransferScreen(Map<String, dynamic> argument) async {
|
||||
}
|
||||
|
||||
void runConnectionManagerScreen() async {
|
||||
// initialize window
|
||||
WindowOptions windowOptions = WindowOptions(
|
||||
size: Size(300, 400),
|
||||
center: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
skipTaskbar: false,
|
||||
titleBarStyle: TitleBarStyle.normal,
|
||||
);
|
||||
await Future.wait([
|
||||
initEnv(kAppTypeConnectionManager),
|
||||
windowManager
|
||||
.setSize(Size(300, 400))
|
||||
.then((value) => windowManager.setAlignment(Alignment.topRight))
|
||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||
await windowManager.setAlignment(Alignment.topRight);
|
||||
await windowManager.show();
|
||||
await windowManager.focus();
|
||||
})
|
||||
]);
|
||||
;
|
||||
runApp(GetMaterialApp(theme: getCurrentTheme(), home: DesktopServerPage()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user