Merge pull request #5752 from dignow/fix/restore_texture_offset_linux

fix, set texture widget offset to int on linux
This commit is contained in:
RustDesk 2023-09-19 23:15:50 +08:00 committed by GitHub
commit 83daa702f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -576,11 +576,13 @@ class _ImagePaintState extends State<ImagePaint> {
late final Widget imageWidget;
if (c.size.width > 0 && c.size.height > 0) {
if (widget.useTextureRender) {
final x = Platform.isLinux ? c.x.toInt().toDouble() : c.x;
final y = Platform.isLinux ? c.y.toInt().toDouble() : c.y;
imageWidget = Stack(
children: [
Positioned(
left: c.x,
top: c.y,
left: x,
top: y,
width: c.getDisplayWidth() * s,
height: c.getDisplayHeight() * s,
child: Texture(