mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
new: custom titlebar on linux/win
This commit is contained in:
@@ -128,7 +128,10 @@ void _setupLogger() {
|
||||
|
||||
Future<void> _initDesktopWindow() async {
|
||||
if (!isDesktop) return;
|
||||
|
||||
await windowManager.ensureInitialized();
|
||||
await CustomAppBar.updateTitlebarHeight();
|
||||
|
||||
const windowOptions = WindowOptions(
|
||||
size: Size(400, 777),
|
||||
center: true,
|
||||
@@ -136,9 +139,7 @@ Future<void> _initDesktopWindow() async {
|
||||
skipTaskbar: false,
|
||||
titleBarStyle: TitleBarStyle.hidden,
|
||||
);
|
||||
|
||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||
if (isMacOS) await CustomAppBar.updateTitlebarHeight();
|
||||
await windowManager.show();
|
||||
await windowManager.focus();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user