flutter_desktop: win scale cursor data

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-10-27 18:40:45 +08:00
parent 6756b67492
commit 0d5eb639a0
4 changed files with 48 additions and 8 deletions

View File

@@ -339,15 +339,15 @@ class ImagePaint extends StatelessWidget {
if (cacheLinux == null) {
return MouseCursor.defer;
} else {
final key = cacheLinux.key(scale);
final key = cacheLinux.updateGetKey(scale);
cursor.addKeyLinux(key);
return FlutterCustomMemoryImageCursor(
pixbuf: cacheLinux.data,
key: key,
hotx: cacheLinux.hotx,
hoty: cacheLinux.hoty,
imageWidth: (cacheLinux.width * scale).toInt(),
imageHeight: (cacheLinux.height * scale).toInt(),
imageWidth: (cacheLinux.width * cacheLinux.scale).toInt(),
imageHeight: (cacheLinux.height * cacheLinux.scale).toInt(),
);
}
}