Merge pull request #1623 from Heap-Hop/master

fix mobile physical mouse wheel scroll
This commit is contained in:
RustDesk 2022-09-27 07:29:50 +08:00 committed by GitHub
commit 9040ada6f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 48 additions and 27 deletions

View File

@ -310,14 +310,15 @@ class _CmHeaderState extends State<_CmHeader>
],
),
),
Offstage(
offstage: client.isFileTransfer,
child: IconButton(
onPressed: () => checkClickTime(
client.id, () => gFFI.chatModel.toggleCMChatPage(client.id)),
icon: Icon(Icons.message_outlined),
),
)
Consumer<ServerModel>(
builder: (_, model, child) => Offstage(
offstage: !client.authorized || client.isFileTransfer,
child: IconButton(
onPressed: () => checkClickTime(client.id,
() => gFFI.chatModel.toggleCMChatPage(client.id)),
icon: Icon(Icons.message_outlined),
),
))
],
);
}

View File

@ -62,6 +62,7 @@ class ChatPage extends StatelessWidget implements PageShape {
inputOptions: InputOptions(
sendOnEnter: true,
inputDecoration: defaultInputDecoration(
hintText: "${translate('Write a message')}...",
fillColor: Theme.of(context).backgroundColor),
sendButtonBuilder: defaultSendButton(
color: Theme.of(context)
@ -87,7 +88,8 @@ class ChatPage extends StatelessWidget implements PageShape {
)),
);
}),
chatModel.currentID == ChatModel.clientModeID
desktopType == DesktopType.cm ||
chatModel.currentID == ChatModel.clientModeID
? SizedBox.shrink()
: Padding(
padding: EdgeInsets.all(12),

View File

@ -325,17 +325,13 @@ class _RemotePageState extends State<RemotePage> {
},
onPointerSignal: (e) {
if (e is PointerScrollEvent) {
var dx = e.scrollDelta.dx;
var dy = e.scrollDelta.dy;
if (dx > 0)
dx = -1;
else if (dx < 0) dx = 1;
if (dy > 0)
var dy = 0;
if (e.scrollDelta.dy > 0) {
dy = -1;
else if (dy < 0) dy = 1;
bind.sessionSendMouse(
id: widget.id,
msg: '{"type": "wheel", "x": "$dx", "y": "$dy"}');
} else if (e.scrollDelta.dy < 0) {
dy = 1;
}
gFFI.scroll(dy);
}
},
child: MouseRegion(

View File

@ -166,12 +166,12 @@ class ChatModel with ChangeNotifier {
if (_isShowChatPage) {
_isShowChatPage = !_isShowChatPage;
notifyListeners();
await windowManager.setSize(Size(400, 600));
await windowManager.setSize(Size(300, 400));
await windowManager.setAlignment(Alignment.topRight);
} else {
await windowManager.setSize(Size(800, 600));
await windowManager.center();
await windowManager.setSize(Size(600, 400));
await Future.delayed(Duration(milliseconds: 100));
await windowManager.setAlignment(Alignment.topRight);
_isShowChatPage = !_isShowChatPage;
notifyListeners();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "取消固定菜单栏"),
("Enable LAN Discovery", "允许局域网发现"),
("Deny LAN Discovery", "拒绝局域网发现"),
("Write a message", "输入聊天消息"),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Odepnout panel nabídek"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Frigør menulinjen"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Menüleiste lösen"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Malfiksi menubreton"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Desbloquear barra de menú"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Détacher la barre de menu"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Menüsor rögzítésének feloldása"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Unpin menubar"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Sblocca la barra dei menu"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "メニューバーのピン留めを外す"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "메뉴 모음 고정 해제"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Мәзір жолағын босату"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Odepnij pasek menu"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Desenganxa la barra de menús"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", ""),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Открепить строку меню"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Uvoľniť panel s ponukami"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", ""),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Menü çubuğunun sabitlemesini kaldır"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}

View File

@ -327,14 +327,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Account", "賬戶"),
("Theme", "主題"),
("Dark Theme", "暗黑主題"),
("Dark", ""),
("Light", ""),
("Follow System", ""),
("Dark", "黑暗"),
("Light", "明亮"),
("Follow System", "跟隨系統"),
("Enable hardware codec", "使用硬件編解碼"),
("Unlock Security Settings", "解鎖安全設置"),
("Enable Audio", "允許傳輸音頻"),
("Temporary Password Length", "临时密码长"),
("Unlock Network Settings", "臨時密碼長度"),
("Temporary Password Length", "臨時密碼長"),
("Unlock Network Settings", "解鎖網絡設置"),
("Server", "服務器"),
("Direct IP Access", "IP直接訪問"),
("Proxy", "代理"),
@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "取消固定菜單欄"),
("Enable LAN Discovery", "允許局域網發現"),
("Deny LAN Discovery", "拒絕局域網發現"),
("Write a message", "輸入聊天消息"),
].iter().cloned().collect();
}

View File

@ -351,5 +351,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Unpin menubar", "Bỏ ghim thanh menu"),
("Enable LAN Discovery", ""),
("Deny LAN Discovery", ""),
("Write a message", ""),
].iter().cloned().collect();
}