mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-14 05:31:29 +03:00
new keyboard offset and scroll
This commit is contained in:
@@ -319,10 +319,12 @@ class CursorModel with ChangeNotifier {
|
||||
}
|
||||
|
||||
double adjustForKeyboard() {
|
||||
var keyboardHeight = MediaQueryData.fromWindow(ui.window).viewInsets.bottom;
|
||||
final m = MediaQueryData.fromWindow(ui.window);
|
||||
var keyboardHeight = m.viewInsets.bottom;
|
||||
final size = m.size;
|
||||
if (keyboardHeight < 100) return 0;
|
||||
final s = FFI.canvasModel.scale;
|
||||
final thresh = 120;
|
||||
final thresh = (size.height - keyboardHeight) / 2;
|
||||
var h = (_y - getVisibleRect().top) * s; // local physical display height
|
||||
return h - thresh;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user