mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
fix image blurry
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
efc9f312e9
commit
c0cf6c3173
@ -413,8 +413,12 @@ class _ImagePaintState extends State<ImagePaint> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
widget = Row(
|
widget = Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
children: [
|
||||||
children: [widget],
|
Container(
|
||||||
|
width: ((layoutSize.width - size.width) ~/ 2).toDouble(),
|
||||||
|
),
|
||||||
|
widget,
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (layoutSize.height < size.height) {
|
if (layoutSize.height < size.height) {
|
||||||
@ -430,8 +434,12 @@ class _ImagePaintState extends State<ImagePaint> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
widget = Column(
|
widget = Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
children: [
|
||||||
children: [widget],
|
Container(
|
||||||
|
height: ((layoutSize.height - size.height) ~/ 2).toDouble(),
|
||||||
|
),
|
||||||
|
widget,
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (layoutSize.width < size.width) {
|
if (layoutSize.width < size.width) {
|
||||||
@ -576,7 +584,8 @@ class ImagePainter extends CustomPainter {
|
|||||||
paint.filterQuality = FilterQuality.high;
|
paint.filterQuality = FilterQuality.high;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
canvas.drawImage(image!, Offset(x, y), paint);
|
canvas.drawImage(
|
||||||
|
image!, Offset(x.toInt().toDouble(), y.toInt().toDouble()), paint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
Loading…
Reference in New Issue
Block a user