mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-10 20:23:07 +08:00
desktop cm: auto focus & merge setSizeAlignment
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
e7ac6eb0d2
commit
4f7af964c6
@ -54,6 +54,7 @@ class ChatPage extends StatelessWidget implements PageShape {
|
|||||||
return DashChat(
|
return DashChat(
|
||||||
onSend: (chatMsg) {
|
onSend: (chatMsg) {
|
||||||
chatModel.send(chatMsg);
|
chatModel.send(chatMsg);
|
||||||
|
chatModel.inputNode.requestFocus();
|
||||||
},
|
},
|
||||||
currentUser: chatModel.me,
|
currentUser: chatModel.me,
|
||||||
messages: chatModel
|
messages: chatModel
|
||||||
|
@ -160,15 +160,10 @@ void runConnectionManagerScreen() async {
|
|||||||
);
|
);
|
||||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||||
await windowManager.show();
|
await windowManager.show();
|
||||||
|
await Future.wait([windowManager.focus(), windowManager.setOpacity(1)]);
|
||||||
// ensure initial window size to be changed
|
// ensure initial window size to be changed
|
||||||
await windowManager.setSize(kConnectionManagerWindowSize);
|
await windowManager.setSizeAlignment(
|
||||||
await Future.wait([
|
kConnectionManagerWindowSize, Alignment.topRight);
|
||||||
windowManager.setAlignment(Alignment.topRight),
|
|
||||||
windowManager.focus(),
|
|
||||||
windowManager.setOpacity(1)
|
|
||||||
]);
|
|
||||||
// ensure
|
|
||||||
windowManager.setAlignment(Alignment.topRight);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,12 +193,9 @@ class ChatModel with ChangeNotifier {
|
|||||||
if (_isShowCMChatPage) {
|
if (_isShowCMChatPage) {
|
||||||
_isShowCMChatPage = !_isShowCMChatPage;
|
_isShowCMChatPage = !_isShowCMChatPage;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
await windowManager.setSize(Size(300, 400));
|
await windowManager.setSizeAlignment(Size(300, 400), Alignment.topRight);
|
||||||
await windowManager.setAlignment(Alignment.topRight);
|
|
||||||
} else {
|
} else {
|
||||||
await windowManager.setSize(Size(600, 400));
|
await windowManager.setSizeAlignment(Size(600, 400), Alignment.topRight);
|
||||||
await Future.delayed(Duration(milliseconds: 100));
|
|
||||||
await windowManager.setAlignment(Alignment.topRight);
|
|
||||||
_isShowCMChatPage = !_isShowCMChatPage;
|
_isShowCMChatPage = !_isShowCMChatPage;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ dependencies:
|
|||||||
window_manager:
|
window_manager:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_window_manager
|
url: https://github.com/Kingtous/rustdesk_window_manager
|
||||||
ref: 88487257cbafc501599ab4f82ec343b46acec020
|
ref: d1e4b40f4a1ffeb8630696be6883dd31bf307998
|
||||||
desktop_multi_window:
|
desktop_multi_window:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||||
|
Loading…
Reference in New Issue
Block a user