From 9f1d4e8ba61a603a9513429d9731d82d51d53f33 Mon Sep 17 00:00:00 2001 From: 21pages Date: Sat, 8 Jul 2023 18:22:30 +0800 Subject: [PATCH] fixed cm control page width and not resizable Signed-off-by: 21pages --- flutter/lib/desktop/pages/server_page.dart | 15 +++++---------- flutter/lib/main.dart | 1 + 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/flutter/lib/desktop/pages/server_page.dart b/flutter/lib/desktop/pages/server_page.dart index f5d5fa4f4..279fd7e97 100644 --- a/flutter/lib/desktop/pages/server_page.dart +++ b/flutter/lib/desktop/pages/server_page.dart @@ -182,19 +182,14 @@ class ConnectionManagerState extends State { .dividerColor))), child: ChatPage()), ), - flex: (kConnectionManagerWindowSizeOpenChat.width - - kConnectionManagerWindowSizeClosedChat - .width) - .toInt(), ) : Offstage(), ), - Expanded( - child: pageView, - flex: kConnectionManagerWindowSizeClosedChat.width - .toInt() - - 4 // prevent stretch of the page view when chat is open, - ), + SizedBox( + width: kConnectionManagerWindowSizeClosedChat.width - + 10, // 10 is from overflow + child: pageView, + ) ], ), ), diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart index 6ff703f6a..59ff18615 100644 --- a/flutter/lib/main.dart +++ b/flutter/lib/main.dart @@ -225,6 +225,7 @@ void runConnectionManagerScreen(bool hide) async { } else { await showCmWindow(isStartup: true); } + windowManager.setResizable(false); // Start the uni links handler and redirect links to Native, not for Flutter. listenUniLinks(handleByFlutter: false); }