opt: use WindowOption to initialize screen
Signed-off-by: Kingtous <kingtous@qq.com>
This commit is contained in:
parent
eed87808e5
commit
9fee1f41e7
@ -117,12 +117,23 @@ void runFileTransferScreen(Map<String, dynamic> argument) async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void runConnectionManagerScreen() 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([
|
await Future.wait([
|
||||||
initEnv(kAppTypeConnectionManager),
|
initEnv(kAppTypeConnectionManager),
|
||||||
windowManager
|
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||||
.setSize(Size(300, 400))
|
await windowManager.setAlignment(Alignment.topRight);
|
||||||
.then((value) => windowManager.setAlignment(Alignment.topRight))
|
await windowManager.show();
|
||||||
|
await windowManager.focus();
|
||||||
|
})
|
||||||
]);
|
]);
|
||||||
|
;
|
||||||
runApp(GetMaterialApp(theme: getCurrentTheme(), home: DesktopServerPage()));
|
runApp(GetMaterialApp(theme: getCurrentTheme(), home: DesktopServerPage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "my_application.h"
|
#include "my_application.h"
|
||||||
|
|
||||||
#include <flutter_linux/flutter_linux.h>
|
#include <flutter_linux/flutter_linux.h>
|
||||||
// #include <bitsdojo_window_linux/bitsdojo_window_plugin.h>
|
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef GDK_WINDOWING_X11
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -66,7 +66,6 @@ dependencies:
|
|||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||||
ref: 2b1176d53f195cc55e8d37151bb3d9f6bd52fad3
|
ref: 2b1176d53f195cc55e8d37151bb3d9f6bd52fad3
|
||||||
# bitsdojo_window: ^0.1.2
|
|
||||||
freezed_annotation: ^2.0.3
|
freezed_annotation: ^2.0.3
|
||||||
tray_manager: 0.1.7
|
tray_manager: 0.1.7
|
||||||
get: ^4.6.5
|
get: ^4.6.5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user