mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-23 19:49:05 +08:00
fix: mobile, don't adjust canvas on gesture help show up (#9846)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
faf97c770c
commit
69277dd16b
@ -1475,14 +1475,16 @@ class CanvasModel with ChangeNotifier {
|
||||
if (isMobile) {
|
||||
h = h -
|
||||
mediaData.viewInsets.bottom -
|
||||
(parent.target?.cursorModel.keyHelpToolsRect?.bottom ?? 0);
|
||||
(parent.target?.cursorModel.keyHelpToolsRectToAdjustCanvas?.bottom ??
|
||||
0);
|
||||
}
|
||||
return Size(w < 0 ? 0 : w, h < 0 ? 0 : h);
|
||||
}
|
||||
|
||||
// mobile only
|
||||
double getAdjustY() {
|
||||
final bottom = parent.target?.cursorModel.keyHelpToolsRect?.bottom ?? 0;
|
||||
final bottom =
|
||||
parent.target?.cursorModel.keyHelpToolsRectToAdjustCanvas?.bottom ?? 0;
|
||||
return max(bottom - MediaQueryData.fromView(ui.window).padding.top, 0);
|
||||
}
|
||||
|
||||
@ -1939,7 +1941,8 @@ class CursorModel with ChangeNotifier {
|
||||
bool _lastIsBlocked = false;
|
||||
bool _lastKeyboardIsVisible = false;
|
||||
|
||||
Rect? get keyHelpToolsRect => _keyHelpToolsRect;
|
||||
Rect? get keyHelpToolsRectToAdjustCanvas =>
|
||||
_lastKeyboardIsVisible ? _keyHelpToolsRect : null;
|
||||
keyHelpToolsVisibilityChanged(Rect? r, bool keyboardIsVisible) {
|
||||
_keyHelpToolsRect = r;
|
||||
if (r == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user