From 3adeba65d871fe8740466e603e4a64826e2295a8 Mon Sep 17 00:00:00 2001 From: fufesou Date: Fri, 18 Nov 2022 22:36:51 +0800 Subject: [PATCH] fix blurry screen when scale original Signed-off-by: fufesou --- flutter/lib/desktop/pages/remote_page.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flutter/lib/desktop/pages/remote_page.dart b/flutter/lib/desktop/pages/remote_page.dart index 1aca198c2..84ea36d78 100644 --- a/flutter/lib/desktop/pages/remote_page.dart +++ b/flutter/lib/desktop/pages/remote_page.dart @@ -565,9 +565,11 @@ class ImagePainter extends CustomPainter { // https://github.com/flutter/flutter/issues/76187#issuecomment-784628161 // https://api.flutter-io.cn/flutter/dart-ui/FilterQuality.html var paint = Paint(); - paint.filterQuality = FilterQuality.medium; - if (scale > 10.00000) { - paint.filterQuality = FilterQuality.high; + if ((scale - 1.0).abs() > 0.001) { + paint.filterQuality = FilterQuality.medium; + if (scale > 10.00000) { + paint.filterQuality = FilterQuality.high; + } } canvas.drawImage(image!, Offset(x, y), paint); }