Commit ef0980a9 authored by fufesou's avatar fufesou

flutter_desktop: fix local cursor (hotx,hoty) offset

Signed-off-by: 's avatarfufesou <shuanglongchen@yeah.net>
parent adafa38c
......@@ -599,8 +599,8 @@ class ImagePaint extends StatelessWidget {
return FlutterCustomMemoryImageCursor(
pixbuf: cacheLinux.data,
key: key,
hotx: cacheLinux.hotx,
hoty: cacheLinux.hoty,
hotx: 0.0,
hoty: 0.0,
imageWidth: (cacheLinux.width * scale).toInt(),
imageHeight: (cacheLinux.height * scale).toInt(),
);
......
......@@ -619,7 +619,7 @@ class CursorData {
int _doubleToInt(double v) => (v * 10e6).round().toInt();
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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment