mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-13 06:07:35 +08:00
flutter_desktop: fix local cursor (hotx,hoty) offset
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
adafa38cfa
commit
ef0980a9b1
@ -599,8 +599,8 @@ class ImagePaint extends StatelessWidget {
|
|||||||
return FlutterCustomMemoryImageCursor(
|
return FlutterCustomMemoryImageCursor(
|
||||||
pixbuf: cacheLinux.data,
|
pixbuf: cacheLinux.data,
|
||||||
key: key,
|
key: key,
|
||||||
hotx: cacheLinux.hotx,
|
hotx: 0.0,
|
||||||
hoty: cacheLinux.hoty,
|
hoty: 0.0,
|
||||||
imageWidth: (cacheLinux.width * scale).toInt(),
|
imageWidth: (cacheLinux.width * scale).toInt(),
|
||||||
imageHeight: (cacheLinux.height * scale).toInt(),
|
imageHeight: (cacheLinux.height * scale).toInt(),
|
||||||
);
|
);
|
||||||
|
@ -619,7 +619,7 @@ class CursorData {
|
|||||||
int _doubleToInt(double v) => (v * 10e6).round().toInt();
|
int _doubleToInt(double v) => (v * 10e6).round().toInt();
|
||||||
|
|
||||||
String key(double scale) =>
|
String key(double scale) =>
|
||||||
'${peerId}_${id}_${_doubleToInt(hotx)}_${_doubleToInt(hoty)}_${_doubleToInt(width * scale)}_${_doubleToInt(height * scale)}';
|
'${peerId}_${id}_${_doubleToInt(width * scale)}_${_doubleToInt(height * scale)}';
|
||||||
}
|
}
|
||||||
|
|
||||||
class CursorModel with ChangeNotifier {
|
class CursorModel with ChangeNotifier {
|
||||||
|
Loading…
Reference in New Issue
Block a user